Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

help with http script

Featured Replies

Hi

I wonder if any one can help me i have these checkboxes which i can click a muliple of boxes good so far

but what i need is to go to differant web pages depending which buttons i click on and if i click on tennis reading and boxing it will take me to a page with these sports on

i know they could be a lot of pages .

I hope I have explaned it ok for you

<form id="myform" class="cssform" action="">
<p>
<label for="comments">Hobbies:</label><br>
<input type="checkbox" name="tennis" /> Tennis<br />
<input type="checkbox" name="reading" class="threepxfix" /> Reading <br />
<input type="checkbox" name="basketball" class="threepxfix" /> Basketball <br />
<input type="checkbox" name="boxing" /> Boxing<br />
<input type="checkbox" name="football" class="threepxfix" /> Football<br />
<input type="checkbox" name="cricket" class="threepxfix" /> Cricket <br />
</p>
<div style="margin-left: 150px;">
<input type="submit" value="Submit" onClick="test.html"(this.myform)/>
<input type="reset" value="reset" />
</div>

</form>

</td>
</tr>
</table>

thanks for any help

smartie91

This won't work with checkboxes, because then what happens if they select multiple boxes, where should it go? What you need to use are radio buttons.

<input type="radio" id="goTo" value="Page 1"/>Page one <br />
<input type="radio" id="goTo" value="Page 2"/>Page two <br />
etc...

Also, if you're using XHTML, make sure to close your line break tags:

<br />

and if you're not using XHTML, don't close your input tags.

  • Author

hi

Thankyou for that info

but what if i need to click on muliple radio buttons then go to a specfic page

thanyou

smartie91

this could prolly be done with a little java script but my JS is too rusty to come up with a maintainable, crossbrowser solution off the top of me head but id try something like this if you have a PHP enabled webserver

<?php
if ($_POST['tennis']=="1" OR $_POST['reading']=="1" OR $_POST['basketball']=="1" OR $_POST['boxing']=="1" OR $_POST['football']=="1" OR $_POST['cricket']=="1") {
if ($_POST['tennis']=="1" AND $_POST['reading']=="1" AND $_POST['boxing']=="1") {
header('Location: http://www.tennisreadingandboxing.com');
}
if ($_POST['tennis']=="1" AND $_POST['reading']=="1") {
header('Location: http://www.tennisandreading.com');
}
} else {
?>
<form id="myform" class="cssform" action="<?php echo $SERVER['PHP_SELF']; ?>" method="POST">
<p>
<label for="comments">Hobbies:</label><br>
<input type="checkbox" value="1" name="tennis" /> Tennis<br />
<input type="checkbox" value="1" name="reading" class="threepxfix" /> Reading <br />
<input type="checkbox" value="1" name="basketball" class="threepxfix" /> Basketball <br />
<input type="checkbox" value="1" name="boxing" /> Boxing<br />
<input type="checkbox" value="1" name="football" class="threepxfix" /> Football<br />
<input type="checkbox" value="1" name="cricket" class="threepxfix" /> Cricket <br />
</p>
<div style="margin-left: 150px;">
<input type="submit" value="Submit">
<input type="reset" value="reset" />
</div>

</form>
<?php
}
?>

Disclaimer: its quick and dirty and there are about a million ways to do it cleaner but its an example. nothing more.

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.