Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JS to go on an entry page to my website

Status
Not open for further replies.

mrsjackaroo

Technical User
Sep 3, 2007
11
Hi

I'm after a bit of help - hope thats ok?:)

I need a JS to go on an entry page to my website. Basically the viewer needs to check a licence box stating they agree, and on checking that box, they are then forwarded to the home page.

Your help is very much appreciated :)

Thanks very much

Rach xxxx
 
Why do a lot of the new posts that have appeared recently seem to be from females assuming that only guys are here doing the helping (i.e. like no female coders exist), or from "females" implying that the sexual prowess of men will increase if they help them?

Why can't people just be professional? This is, after all, a forum for computer professionals.

*shrug*

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Oh dear Dan!

Sleep well did you???

For your information, I'm from Australia and we use that expression for both male and female.

Apologies if I've upset you.....but.......lighten up!

Thanks for your help anyway!
 
Sorry - I'd literally read this post 2 seconds before yours:


and then saw the "xxxx" at the bottom of your post, and thought "not another one".

It drives me crazy! We have 2 female developers in our team, and many people here (mainly americans and older men) are always going on about how men are better at some coding tasks while women are better at others. I don't see it - everyone in this team is equal.

Anyway - try something like this:

Code:
<input type="checkbox" onclick="if (this.checked) window.location = '[URL unfurl="true"]http://www.google.co.uk/';"[/URL] />

Hope this helps,
Dan




Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
I had a problem when I was first working as a teacher/trainer in New Zealand, in that I also referred to everyone (regardless of gender, age, etc) using that expression - "guys".

It was brought to my attention half way through a training session made up of 14 women, then there wer "no guys here".

When it was pointed out to me I was very embarrassed... and have since tried to temper my use of this antipodean phrase. However, my halo still slips from time to time (although not as frequently as it used to) [smile]

Back to the issue at hand... I would suggest something like this:
Code:
<form action="" onsubmit="return false">
  <fieldset>
    <p>Some text and stuff - do you agree to the terms?</p>
    <input type="checkbox" id="chk" onclick="location.href='[!][URL unfurl="true"]http://www.url.com/somepage.htm[/URL][/!]';"/>
    <label for="chk">Yes I agree</label>
  </fieldset>
</form>

Let us know if there are any problems integrating this into your code.

Cheers,
Jeff

[tt]Jeff's Blog [!]@[/!] CodeRambler
[/tt]

Make sure your web page and css validates properly against the doctype you have chosen - before you attempt to debug a problem!

FAQ216-6094
 
Ah what a great site!

Thanks guys (sorry it just comes out automatically!! I'll try and change honest!!)

I am def not one of those who believes men are better at coding than women etc - in fact I absolutely love coding (am I sad??? I think I may be!!).

I'll try your codes and report back.

Thanks very much

Rach
 
Works a dream Dan!

Thanks ever so much - very much appreciated!

Rach
 
Jeff I actually prefer yours (sorry Dan)

Any idea how I could add a pop up box after the 'i agree' box has been ticked saying 'enter site' as a secondary precaution.

Thanks again

Very very much appreciated.

Rach
 
I would say something like this:
Code:
<form action="" onsubmit="return false">
  <fieldset>
    <p>Some text and stuff - do you agree to the terms?</p>
    <input type="checkbox" id="chk" onclick="[!]if(confirm('Are you sure?'))[/!]location.href='[URL unfurl="true"]http://www.url.com/somepage.htm';"/>[/URL]
    <label for="chk">Yes I agree</label>
  </fieldset>
</form>
Hope that does the trick!

Cheers,
Jeff

[tt]Jeff's Blog [!]@[/!] CodeRambler
[/tt]

Make sure your web page and css validates properly against the doctype you have chosen - before you attempt to debug a problem!

FAQ216-6094
 
Cheers Jeff - you're saving me lots of time this evening!

Very much appreciated!

Rach
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top