help on javascript on url

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

help on javascript on url

by princessvan on Thu Oct 10, 2013 6:36 am

him can somebody help me in basic javascript using imacros

i have basic knowledge in javascript. im trying to replace inner html using javascript n url

this works great
var i, retcode;
var macrolist = new Array();
oldurl = iimGetLastExtract (1);
newurl = 'oldurl';
iimSet ("url3", newurl);
retcode = iimPlay("prolink/mac2.iim");
}

in my .iim script
URL GOTO=={{url3}}

it goes to the las ip extracted

no problem with this

but my main goal is having a JS on url


javascript: document.body.innerHTML.replace("TEST", "admin"); document.body.innerHTML.replace("user", "TESTUSER"); document.body.innerHTML.replace("/goform/formPasswordSetup", "http://192.168.1.1/goform/formPasswordSetup");

looks somethin like this

URL GOTO =javascript: document.body.innerHTML.replace("TEST", "admin"); document.body.innerHTML.replace("user", "TESTUSER"); document.body.innerHTML.replace("/goform/formPasswordSetup", "http://192.168.1.1/goform/formPasswordSetup");

note that 192.168.1.1 is the last extracted IP

so i made this code based on the first code i made but edited to fit

var i, retcode;
var macrolist = new Array();
oldurl = iimGetLastExtract (1);
newurl = 'javascript: document.body.innerHTML.replace("Failed", "adminpldt"); document.body.innerHTML.replace("user", "adminpldt"); document.body.innerHTML.replace("/goform/formPasswordSetup", "http://"' + oldurl + '"goform/formPasswordSetup")';
iimSet ("url3", newurl);
retcode = iimPlay("prolink/mac2.iim");
}

but when i input on my iim

URL GOTO=={{url3}}

it cannot load or error

something wrong with my code on putting a var on string? thanks
princessvan
 
Posts: 1
Joined: Thu Oct 10, 2013 6:06 am

Return to iMacros for Firefox

Who is online

Users browsing this forum: No registered users and 11 guests

-->