...

View Full Version : need help with the script



irbis
06-13-2010, 08:23 PM
i have this


VERSION BUILD=6650406 RECORDER=FX
TAB T=1
URL GOTO=something.com
TAG POS=2 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=NAME:id CONTENT=something1
SET !ENCRYPTION NO
TAG POS=2 TYPE=INPUT:PASSWORD FORM=NAME:NoFormName ATTR=NAME:pw CONTENT=something1
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:NoFormName ATTR=NAME:pw2 CONTENT=something1
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=NAME:email CONTENT=something@so.com.com
TAG POS=1 TYPE=SELECT FORM=NAME:NoFormName ATTR=NAME:year CONTENT=%1964
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:NoFormName ATTR=VALUE:Register!


now what i need is to change the code so the "something" in all CONTENT will change everytime. the math formula would be
[x]+1 where x = something

so it would end up as something1 ->something2->something3 and so on and on and on

any ideas how can i change it?

sorry - total javascript newbie over this side of screen :)

Skychan
06-13-2010, 09:42 PM
I have no idea what all that is inside your <code></code> area. It sorta looks like something similar to ASP or something... I can't guess. So I'm gonna assume it's just a String literal.

If it is a String literal and you want to change values of "something" to one thing and "something1" to another thing, and so on, then all you need is regular expressions and the String's replace() method.

int x = 0;
var myString = "x + 1 = y";
myString = myString.replace("x", x);//replace first occurrence of x
myString = myString.replace(/x/g,x);//replace ALL occurrences of x



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum