Jump to content
Server Maintenance This Week. ×

I have created a custom iwp_home.html page which for the sake of this example includes: [code]<div id="buttons"> <ul> <li><a href="http://<ipaddres s>/fmi/iwp/cgi?-d


This topic is 6141 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have created a custom iwp_home.html page which for the sake of this example includes:







I am using a freely available javascript (see below) to pick up the name variable in the target html file, which in this case is iwp_auth.html. 



javascript:




function getValue(varname)

{

// First, we load the URL into a variable

var url = window.location.href;



// Next, split the url by the ?

var qparts = url.split("?");



// Check that there is a querystring, return "" if not

if (qparts.length == 0)

{

return "";

}



// Then find the querystring, everything after the ?

var query = qparts[1];



// Split the query string into variables (separates by &s)

var vars = query.split("&");



// Initialize the value with "" as default

var value = "";



// Iterate through vars, checking each one for varname

for (i=0;i

{

// Split the variable by =, which splits name and value

var parts = vars[i].split("=");



// Check if the correct variable

if (parts[0] == varname)

{

// Load value into variable

value = parts[1];



// End the loop

break;

}

}



// Convert escape code

value = unescape(value);



// Convert "+"s to " "s

value.replace(/+/g," ");



// Return the value

return value;

}




I am linking to this from the head of the iwp_auth.html file using:









Then in the body of the iwp_auth.html file I am trying to present the user with the correct form content using:
















This does not appear to be working because the 'name' variable does not appear to be picked up by the iwp_auth.html page. The problem I think is either to do with the format of the links with the variables in the iwp_home.html page, namely:




"http:///fmi/iwp/cgi?-db=dBase.fp7&-loadframes"&name="login" 

or it is possibly due to the fact that the submitted path (including the attached variables) is being hidden from the iwp_auth.html page.

I have tested the javascript and basic linking code along with the if statement in a plain html document that does not involve the iwp pages and all the code works fine.

I'm hoping someone might be able to point me in the right direction to resolve this problem.

Thanks in advance for any assistance with this.

Link to comment
Share on other sites

This topic is 6141 days old. Please don't post here. Open a new topic instead.

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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.