GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   coding - how do i do this? (https://gfy.com/showthread.php?t=1062132)

rogueteens 03-23-2012 08:25 AM

coding - how do i do this?
 
Code:


<form name="f1">
text<br>
<input type="checkbox" name="cb1" value="ON"> <b>
<span onClick="document.f1.cb1.checked=(! document.f1.cb1.checked);">
<a target="_blank" href="http://test.com">CLICK HERE for more</a></span></b>
</form>

What i want it to do is for the checkbox to be clickable to go to the URL but to show a tick after the click, if you see what i mean?

Cheers :)

mikke 03-23-2012 08:39 AM

Code:

<label><input type="checkbox" name="dupa" value="1" /> click here to check/uncheck</label>
you mean this?

rogueteens 03-23-2012 08:48 AM

no, not really. i want the actual checkbox to be connected to a hyperlink so that when the surfer clicks the box they get sent to a url.

fris 03-23-2012 09:02 AM

Code:


<form name="f1">
<input onClick="window.open('http://google.com','_blank');" type="checkbox" name="cb1" value="ON">
</form>

this maybe?

RazorSharpe 03-23-2012 09:04 AM

Quote:

Originally Posted by rogueteens (Post 18840649)
no, not really. i want the actual checkbox to be connected to a hyperlink so that when the surfer clicks the box they get sent to a url.

Code:

<input
    type="checkbox"
    value="http://www.google.com"
    name="checket"
    onClick="if (this.checked) { window.location = this.value; }"
/>


rogueteens 03-23-2012 09:08 AM

thanks guys :)


All times are GMT -7. The time now is 11:13 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123