Kolinski Posted July 15, 2013 Share Posted July 15, 2013 Hi all, I have a webpage which opens redeem.html. The page has an option which you can see in the URL given underneath. - Caltex starcash card promotion When clicking on the navigation bar "redeem" its opens redeem.html however I'd like it to select the first option "Caltex starcash car promotion" by default on click of redeem in the navigation bar. So at first the url looks like this: http://www.continentalpromotions.com.au/redeem.html and I want this : http://www.continentalpromotions.com.au/redeem.html# Click on the url and have a go at looking at the URL to understand what I want, I can't figure this one out right now on how to get the options to be selected already. Any help would be very much appreciated the code is listed underneath of the <div> containing the link. <div class="span4"><a href="#"><img id="promo1" src="img/Promotions/redeempage/CaltexCardredeem.png" onClick="changeimage()" width="284" height="261" border="0"></a><br> <br> </div> Quote Link to comment https://forums.phpfreaks.com/topic/280156-selecting-an-option-by-default-on-page-load/ Share on other sites More sharing options...
_EmilsM Posted July 15, 2013 Share Posted July 15, 2013 do img onLoad="setActive()" and make a function that does the right thing Quote Link to comment https://forums.phpfreaks.com/topic/280156-selecting-an-option-by-default-on-page-load/#findComment-1440735 Share on other sites More sharing options...
Kolinski Posted July 15, 2013 Author Share Posted July 15, 2013 okay thank you for the quick reply. onLoad="setActive()" will make the <a href link active when entering redeem.html? When you say create function, are you speaking about how PHP enters the chosen path? Quote Link to comment https://forums.phpfreaks.com/topic/280156-selecting-an-option-by-default-on-page-load/#findComment-1440737 Share on other sites More sharing options...
_EmilsM Posted July 15, 2013 Share Posted July 15, 2013 onLoad="setActive()" will make the <a href link active when entering redeem.html? no, it wont. And the function is about the same as the changeImage() function (javascript) but a bit different. Quote Link to comment https://forums.phpfreaks.com/topic/280156-selecting-an-option-by-default-on-page-load/#findComment-1440740 Share on other sites More sharing options...
Kolinski Posted July 15, 2013 Author Share Posted July 15, 2013 how can I make the link already active on entering the page? So when a customer fills out the form it understands that it is for that option? Quote Link to comment https://forums.phpfreaks.com/topic/280156-selecting-an-option-by-default-on-page-load/#findComment-1440741 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.