JavaScript in Action Button that uses URL

I am evaluating OpenCube’s Visual QuickMenu Pro (opencube.com domain name is for sale. Inquire now.).

I am attempting to place @Commands (into JavaScript) into the “URL” (or link) field in this menu creator - it is looking for a URL to go to when this menu item is clicked as far as I can tell.

I have tried the following as tests:

javascript:document.submit()

and

javascript:history.back()

I cannot get this to work - should the “onClick” event be set differently? Do I have to customize it further?

Should the onClick event just be “history.back()” for example?

Thanks!

Subject: JavaScript in Action Button that uses URL…

You can put Hidden action buttons on the form that have the @Commands, Use the JavaScript to “click” these hidden buttons.

Subject: RE: JavaScript in Action Button that uses URL…

I can get the URL the button is using - how do I change from:

“…/ViewName?OpenView”

to

“javascript:(myfunction)”

I just want to menu item to perform an action, not open a link - such as a view, form, etc.

I understand the hidden actions idea, but how do I format the “onClick” event?

“history.back()” or “javascript:history.back()”??

Thanks!

Subject: Code to update…

Here is the function that sets the “onclick” event in the menu item:

function q32(index){

eval(eval(“window.dqm__clickitem_code”+index));

if(!eval(“window.dqm__url”+index))return;

if(eval(“window.dqm__urltarget”+index))where=eval(“dqm__urltarget”+index);

else where=dqm__urltarget;

 					if(where.length<1 || where.toLowerCase()=="_self")window.location.href=eval("dqm__url"+index);

				else {

  							if(where.toLowerCase().indexOf("_parent")>-1)eval("parent.window.location=dqm__url"+index);

  							else if(where.toLowerCase().indexOf("_new")<0)eval("parent."+where+".location=dqm__url"+index);

  							else window.open(eval("dqm__url"+index));

 					}

};

The code that writes the

tag with this onlick event calls this function and sets the “onclick” event:

Example:

onclick="q32(‘“+i+”’)"

where “i” is the index on the menu, such as Menu item 1, sub-item 2 would be “1_2” - it finds the corresponding url value.

Example:

dqm__url1_0_2 = vqm__database+“AuditPersonnelWeekly?OpenView”

where vqm__database is set to ‘’…

In the above function, how would I update the codeso that if is not a URL, if would execute a JavaScript function?

Thanks!

Subject: RE: JavaScript in Action Button that uses URL…

Any examples?