Google Answers Logo
View Question
 
Q: HTML/Javacript Code Snippet ( No Answer,   0 Comments )
Question  
Subject: HTML/Javacript Code Snippet
Category: Computers > Programming
Asked by: mattmclaughlin-ga
List Price: $20.00
Posted: 14 Feb 2006 04:04 PST
Expires: 15 Feb 2006 04:33 PST
Question ID: 445571
I need some html/javascript code that generates an href URL of the form: 
http://www.mypage.com/product_info.php/products_id/4#FeaturesBenefits

with the following restrictions:
1) In the document the following is set: <base href =
"http://www.mypage.com/"> and can NOT be changed

2) Can not use form elements in any way but can use javascript

3) Dynamically changes the redirect URL based on the products_id
value.  For example, when located on

   http://www.mypage.com/product_info.php/products_id/4 
   - it builds -
   http://www.mypage.com/product_info.php/products_id/4#FeaturesBenefits 

   and when on 

   http://www.mypage.com/product_info.php/products_id/9999
   - it builds -
   http://www.mypage.com/product_info.php/products_id/9999#FeaturesBenefits

4) Needs to work regradless of whether the user is at:
   
   "http://www.mypage.com/product_info.php/products_id/4"
   -or-
   "http://www.mypage.com/product_info.php/products_id/4#Shipping"

5) Needs to open the page in the same browser window and work with
right-click and shift-click functionality

Request for Question Clarification by palitoy-ga on 14 Feb 2006 04:46 PST
I have re-read your question and I am a little unsure to what exactly
you require.  Are you simply trying to get the page to always open at
the #FeaturesBenefits anchor?

I noticed that the page is also a php script.  Would a PHP solution be acceptable?

Clarification of Question by mattmclaughlin-ga on 14 Feb 2006 07:53 PST
I have re-read your question and I am a little unsure to what exactly
you require.  Are you simply trying to get the page to always open at
the #FeaturesBenefits anchor?

YES - THIS IS WHAT I AM TRYING TO DO BUT IF I CODE AS
href="#FeaturesBenefits" THEN THE URL DECOMES
www.mypage.com/#FeaturesBenefits BECAUSE OF THE BASE HREF SETTING

Would a PHP solution be acceptable?

NO - A PHP SOLUTION IS NOT ACCEPTABLE.  THIS PIECE OF THE CODE IS
GETTING PULLED OUT OF A DB AND CAN ONLY BE INTERPRETED BY THE BROWSER.
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy