Welcome visitor
* Login
* Register
It is currently May 26th, 2019, 3:08 pm
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » JavaScript



Post new topic Reply to topic  [ 3 posts ] 
Author Message
  Redirect to an URL when a box is checked
PostPosted: February 11th, 2009, 1:45 am 

Posts: 46
Hi,

I need a JS to my site. When the viewer checks a box stating that they agree an statement, they are then forwarded to the home page.

Thanks


Top
 Profile  
 
  Re: Send to an URL when a box is checked
PostPosted: February 11th, 2009, 1:56 am 
User avatar

Posts: 37
<form action="" onsubmit="return false">
  <fieldset>
    <p>Some text and stuff </p>
    <input type="checkbox" id="chkbox" onclick="location.href='http://www.anything.com';"/>
    Yes I agree
  </fieldset>
</form>


hope this works


Last edited by mark07 on February 11th, 2009, 2:06 am, edited 1 time in total.

Top
 Profile  
 
  Re: Send to an URL when a box is checked
PostPosted: February 11th, 2009, 2:05 am 
User avatar

Posts: 37
also, you can add this confirmation window:
<input type="checkbox" id="chkbox" onclick="if(confirm(Sure?'))location.href='http://www.anything.com';"/>


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

FORUMS » Client Side » JavaScript


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron