Forum Groups
  All forums
    Help & Feedback
      Questions
      Work in progress
      Finished Art
      Non-Max related
    Community
      Offtopic
      News
    Hardware
    Photography


Featured Threads
  inspiration alert!!!
(36 replies)
  Indespensible MaxScripts, Plugins and 3rd Party Tools
(37 replies)
  The allmighty FREE Resources Thread !
(17 replies)
  spam alert!!!
(4886 replies)
  Maxforums member photo gallery index
(114 replies)
  Maxforums Member Tutorials
(89 replies)
  three cheers to maxforums...
(240 replies)
  101 Things you didnt know in Max...
(198 replies)
  A Face tutorial from MDB101 :D
(95 replies)
  Maxforums.org Members Gallery
(516 replies)
  SON OF POST YOURSELF
(637 replies)
  Dub's Maxscript Tutorial Index
(119 replies)

Maxunderground news unavailable

anyone is skilled with Javascript ?
show user profile  gogodr
I have some problems making a replacement script for forums x.x (( not this forums :3 ))

this is my script

___________________________________
// ==UserScript==
// @name adding text styling test
// @namespace http://forum.cheatengine.org/*
// @include *forum.cheatengine.org/*
// ==/UserScript==
var postButton = document.forms.namedItem("post").elements.namedItem("post");
var newmsg = "";
var oldmsg = "";

function FLQ(){
var evalutaionMessage = document.forms.namedItem("post").elements.namedItem("message");
var newmsgpos;
while (parseInt(evaluationMessage.value.search("[/quote]")) != -1 ){
newmsgpos = evaluationMessage.value.search("[/quote]");
evaluationMessage.value.replace("[/quote]","[/oldquote]");

newmsg = evaluationMessage.substring(newmsgpos + 8);
oldmsg = evaluationMessage.substring(0,newmsgpos + 8);
}


function styling(newmsg,oldmsg)
{
FLQ();
var postMessage = document.forms.namedItem("post").elements.namedItem("message");
postMessage.value=oldmsg+"[color=darkblue][size=9] "+newmsg+" [/size][/color]";

}

postButton.addEventListener("click", styling, true);
___________________________________________________

but is not working.. gives me syntax error at line 31 but it doesnt have 31 lines...

Hello there

beautiful ;3


read 354 times
6/10/2010 11:03:30 PM (last edit: 6/10/2010 11:04:30 PM)
show user profile  Dave
"anyone is skilled with Javascript ?"

Well, I don't know about anyone... a few, I guess.

"I flew over Egypt once"

read 338 times
6/10/2010 11:32:50 PM (last edit: 6/10/2010 11:32:50 PM)
show user profile  gogodr
xP

Hello there

beautiful ;3


read 332 times
6/10/2010 11:59:42 PM (last edit: 6/10/2010 11:59:42 PM)
show user profile  killerbee2
that sounds like an AS thing !
Maybe for once he can make hisself usefull :)





read 314 times
6/11/2010 1:48:30 AM (last edit: 6/11/2010 1:48:30 AM)
show user profile  gogodr
lol

Hello there

beautiful ;3


read 310 times
6/11/2010 2:00:35 AM (last edit: 6/11/2010 2:00:35 AM)
show user profile  Stephen R.
no closing } after your first function.

you close your while loop, but not the function itself.





read 308 times
6/11/2010 2:01:49 AM (last edit: 6/11/2010 2:02:09 AM)
show user profile  mathias-soeholm
What is the syntax error exactly saying?

Nevermind, i think Stephen might have found your problem


Website - Twitter

read 306 times
6/11/2010 2:02:22 AM (last edit: 6/11/2010 2:05:02 AM)
show user profile  gogodr
yep I fixed that some time ago xP got help from another friend but it doesnt work still D:

this is it:


// ==UserScript==
// @name adding text styling test
// @namespace http://forum.cheatengine.org/*
// @include *forum.cheatengine.org/*
// ==/UserScript==
var postButton = document.forms.namedItem("post").elements.namedItem("post");
var newmsg = "";
var oldmsg = "";

function FLQ(){
var evalutaionMessage = document.forms.namedItem("post").elements.namedItem("message");
var newmsgpos;
while (parseInt(evaluationMessage.value.search("[/quote]")) != -1 ){
newmsgpos = evaluationMessage.value.search("[/quote]");
evaluationMessage.value.replace("[/quote]","[/oldquote]");
}
newmsg = evaluationMessage.substring(newmsgpos + 8);
oldmsg = evaluationMessage.substring(0,newmsgpos + 8);
}


function styling(newmsg,oldmsg){
FLQ();
var postMessage = document.forms.namedItem("post").elements.namedItem("message");
postMessage.value=oldmsg+"[color=darkblue][size=9] "+newmsg+" [/size][/color]";

}

postButton.addEventListener("click", styling, true);

________________

got it working I think.. it was because of a misspell on defining xP

but now my FF freezes when it runs I think.. maybe it is because of the while

Hello there

beautiful ;3


read 302 times
6/11/2010 2:09:14 AM (last edit: 6/11/2010 2:21:33 AM)
show user profile  gogodr
fixed it was == instead of =

Hello there

beautiful ;3


read 273 times
6/11/2010 6:57:49 PM (last edit: 6/11/2010 6:57:49 PM)
#Maxforums IRC
Open chat window


Support Maxforums.org