View Full Version : Couple Of Question

06-06-2007, 04: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

06-06-2007, 09: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(elements.value<'50' || elements.value>'500'){
alert('the number inputedis out of specifications');}
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.

06-07-2007, 12:21 AM
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.

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

06-07-2007, 01: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.

06-07-2007, 01: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

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


06-07-2007, 03:08 AM

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.

06-07-2007, 11: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