...

View Full Version : Couple Of Question



stan1
06-06-2007, 03:19 PM
Hi guys, I have tried to look both on google and on the site, but have found nothing.

My first questions is that I am using a chainedmenu ("goto" option), everything is perfect but the only thing is that I need a confirmation page, Where on this page there will be displayed the options that the user selected.
Is this possible to achieve?

Secondly, I have a text box on my site where the user inputs a number from 50 to 500, I would need to have the number inputed checked to see that it is of the correct formatm scale. How can I do this?

Any help I recieve will be very very appreciated
Thanks

brandonH
06-06-2007, 08:59 PM
as far as passing information to anoter page using javascript, yes it is possible and i would be glad to show you how. I am a bit confused as to what you want with the number part.... you want to check to see if the value inputed is a number and that it is between 50 and 500?


if so can use :



if(!isNaN(elements.value)){
if(elements.value<'50' || elements.value>'500'){
alert('the number inputedis out of specifications');}
}
else{
alert('the value inputed is not a number');}


of course the above is an example and if you wantedit to be triggered when the form is submitted you will need to modify it so that if it catches anything not what it should be, it will stop the form from being submitted. let me know, can help you there as well.

stan1
06-06-2007, 11:21 PM
Hi, thank very very much for getting back to me, about the user selections being repeated/shown for confirmation on another page, I am using the chained menu, This is like what I am using and it is this information (when the user clicks 'go' that I want to be shown in another page.
http://www.dynamicdrive.com/dynamicindex1/chainedmenu/index.htm

For the value validation, yes that is exactly what I want it to do (check that the number entered is between 50 an 500)
How could I implement the example you have provided me onto my site,
Sorry I am at a very basic stage, and I am used to using things WAY more uncomplicated than this :)

Thanks for your help

glenngv
06-07-2007, 12:03 AM
Are you using a server-side language like PHP, ASP, etc? It would be a lot easier and straightforward to display the selected value from the previous page to the current page using a server-side language as compared to client-side Javascript.

stan1
06-07-2007, 12:21 AM
No, just now i am using html/js, but as it is getting to complex I think I will start again and use PHP instead. If you are able to point me in the right direction of how I could do this I would be so grateful
Or which server side form would you recommend to use?
Many Thanks

glenngv
06-07-2007, 12:59 AM
I don't know PHP but here's a tutorial on PHP $_GET and $_POST variables.

http://www.w3schools.com/php/php_get.asp
http://www.w3schools.com/php/php_post.asp

brandonH
06-07-2007, 02:08 AM
http://www.codingforums.com/showthread.php?t=100579

the above is a link to a related topic. its demonstrates a way to pass variables rom one page to the next using javascript. hope this is what you are looking for in a javascript.

stan1
06-07-2007, 10:52 AM
Hey guys, thanks very much for your help. I think though, that I will read up on some PHP first and then try and set up my site in that way.
but if I need any help I definately know where to come :)

Many Thanks



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum