Jump to content
xisto Community
Sign in to follow this  
Funtoosh

JavaScript Frames & Querystring

Recommended Posts

Hi,
I actually want to create a HTML page which has the capablity of reading a QueryString (x.html?querystring=test) and then using a hidden frame pass on the data to an ASP Script on another server.
For obtaining the QueryString i use the following:-

<script>function getQueryVariable(variable) {  var query = window.location.search.substring(1);  var vars = query.split("&");  for (var i=0;i<vars.length;i++) {	var pair = vars[i].split("=");	if (pair[0] == variable) {	  return pair[1];	}  } }</script><script>  alert( getQueryVariable("QueryString") );</script>

Now my problem is to create a dynamic frame(hidden) who's location chnges according to the QueryString like
http://someserver.com/sample.asp?QuerySting=TheValueGivenToTheHTMLFile

Share this post


Link to post
Share on other sites

This might not be the answer you're looking for, but why not make the JavaSscript page in ASP instead of JS? I mean, ASP can parse query strings too, and can even do so in a better way than JS, and besides, with ASP no one can see any processing you're doing to the query string.

Share this post


Link to post
Share on other sites

This might not be the answer you're looking for, but why not make the JavaSscript page in ASP instead of JS? I mean, ASP can parse query strings too, and can even do so in a better way than JS, and besides, with ASP no one can see any processing you're doing to the query string.


Hi!
Well, i am currently now hosted on a website which allows ASP scripting, so my asp scripts are on another server so what you are saying i cannot do!!

(PS. By the way how do you see how many points have you collected till now.)

Share this post


Link to post
Share on other sites

You can see here the number of points you have gathered so far. If I remember correctly, Xisto doesn't support ASP, but ASP sucks anyways. Use PHP! Sorry to tell you this, but ASP is really annoying and bad to use! PHP is so much better...

I'm really sorry for this answer, but I know both languages, and even PHP, that is often criticized as a really lousy language, is far superior to ASP. If you really want in on the current trends, check out Rails, as it seems really good (even though I've never tried it). And write a few messages here on there on the Xisto forums, and you'll see that in a few days you'll already have incredible hosting that supports PHP and Rails (and maybe even ASP, again, I'm not sure).

Share this post


Link to post
Share on other sites

I have button in asp.Net form and I want to save result of a javascript function in a gridview by using event of button_onclicked-question by franky

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.