navigation on button click

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved

Join Date: Jan 2008
Posts: 49
Reputation: Ankita B is an unknown quantity at this point 
Solved Threads: 0
Ankita B's Avatar
Ankita B Ankita B is offline Offline
Light Poster

navigation on button click

 
0
  #1
Jan 30th, 2008
hi,
i have a form with 3 radio buttons and one submit button.on clicking submit i want to navigate to page corresponding to the radio button selected.How can i achieve this?..
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 483
Reputation: DangerDev has a spectacular aura about DangerDev has a spectacular aura about 
Solved Threads: 58
DangerDev's Avatar
DangerDev DangerDev is offline Offline
Posting Pro in Training

Re: navigation on button click

 
0
  #2
Jan 30th, 2008
Hi
use document.location.href property to achieve this.
suppose u want to navigate to page example.html then u can do like this
document.location.href="example.html";
Freedom in the Mind, Faith in the words.. Pride in our Souls...
Indian Developer
http://falaque.wordpress.com/
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 49
Reputation: Ankita B is an unknown quantity at this point 
Solved Threads: 0
Ankita B's Avatar
Ankita B Ankita B is offline Offline
Light Poster

Re: navigation on button click

 
0
  #3
Jan 30th, 2008
hey thx..i figured it out..usin window.location="url"..it wrks the same way u say..
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,614
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 466
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: navigation on button click

 
0
  #4
Jan 30th, 2008
Though it works, it's an incorrect way of doing things. location property of the window object is an object, not a string. The location object in turn has an href property of type string and hence location.href = "url"; is the correct, location = "url"; is not.
I don't accept change; I don't deserve to live.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC