It's not possible to define new javascript functions presently. Please explain WHAT you are trying to do, and then someone can help with the HOW.
S. On 21/04/06, Tapaswini Das <[EMAIL PROTECTED]> wrote: > > Hi Dave, > > Can you please tell me how to use this java script through inserting > dummy regex parsers and assigning the JavaScript output where? Can you > please tell me the flow "where n how to declare java script function and > where write java script?" > Please reply me its urgent. > > Thanks in Advanced > Tapaswini > > > -----Original Message----- > From: David Bronner [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 20, 2006 10:05 PM > To: JMeter Users List > Subject: Re: Where to declare the java script with the help of function and > how to call this function in JMeter > > AFAIK, you can use javascript in almost any field with the syntax > ${__javaScript()} However, I have basically the same question...where are > we supposed to do assignments to variables with values generated by > javascript? I've been inserting dummy regex parsers and assigning the > javascript output there, but it seems like there has to be a better way. It > would be great if there were a pre-processor that just assigned values to > variables. > > -Dave > > On 4/19/06, Tapaswini Das <[EMAIL PROTECTED]> wrote: > > > > Hi All, > > > > > > > > I'm using JMeter 2.0.3 for Load testing. > > > > My Test case is to create a document through one user and before uploading > > the ppt the ID is created then after in file properties page upload the > > slides. Each user create different Document id which generated by the > > application and showed in the http request of JMeter. > > > > > > > > I've JavaScript can any one tell me how I'll use these java scripts so > > that > > each user can create different document at a time by load script. > > > > > > > > "Where to declare the java script with the help of function and how to > > call > > this function in JMeter " > > > > > > > > > > > > Javascripts > > > > > > > > 1.function getTestForm(paneId, object){ > > > > var frms = document.forms; > > > > for (var i=0;i<frms.length;i++) { > > > > var frm = frms[i]; > > > > if (frm.name.indexOf(paneId) > - 1) { > > > > if(object == 'folder') return > > getFolderId(frm); > > > > else if(object == 'component') return > > getComponentId(frm); > > > > else if(object == 'document') return > > getDocumentId(frm); > > > > } > > > > } > > > > return null; > > > > } > > > > > > > > 2.function getFolderId(f){ > > > > if (f.folderId != null && f.folderId != 'undefined') > > > > return f.folderId.value; > > > > else > > > > null; > > > > } > > > > > > > > 3.function getDocumentId(f){ > > > > if (f.documentId !=null && f.documentId != 'undefined') > > > > return f.documentId.value; > > > > else > > > > null; > > > > } > > > > > > > > 4.function getComponentId(f){ > > > > if (f.componentId !=null && f.componentId != 'undefined') > > > > return f.componentId.value; > > > > else > > > > null; > > > > } > > > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]