PDA

View Full Version : Substituting values from JS into ASP


recedo
03-04-2003, 11:38 PM
Hi,
I am currently using a program called codecharge studio to develop an ASP application, this is a rapid application development tool, hence I do not know how to program in asp very well.

I am trying to make the application as 'plug and play' as possible, but at the moment it requires quite a lot of editing of the scripts in order to set it up.

What I was wondering is, is there a way that I could have one .js file that would contain the elements that had to be inserted (for example I have url in several places as well as PayPal email address and a few other things. This .js file would then be called from each of the pages that needed some information.

I realisae that because of the way the application works it will not be possible to be completly plug and play, but I would like it so the user just has to edit one file, i.e. a heavily commented .js file.

If anyone could give me some help with this and point me in the right direction, or to any tutorials etc on the matter, please let me know.

Thanks a lot, in advance

Simon Wall

x_goose_x
03-05-2003, 05:03 AM
This seems more like a server-side question. I don't know about asp, but with php you could use

location.replace("http://www.site.com/submitit.php?fname="+myval+"&"+myvar2+"="+myval2);

and in the file submitit.php:

$_GET['fname'];


I'm sure ASP can't be that much different. Try searching for how to receive get posts.

recedo
03-05-2003, 10:20 AM
Hi, thanks, I think you've helped point me in the right direction!

Simon