Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

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

Featured Replies

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.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.