|
Mr.Hall and
Ismail,
I appreciate the detailed answer. But, I had tried it using javascript and the thing is that once I retrieve the values from the database and try to send them up to the javascript function 'editRec_win' -- the values are defined as null. I can't seem to pinpoint the problem and the only way that the values were not null is if i directly put the link in the 'href' tag itself -- pretty much what i had written below. I do appreciate your response. Thank you jags ----- Original Message ----- From: <David.L.Hall@bridge.bellsouth.com> To: <jbedi@palasys.com> Cc: <ajug-members@www.ajug.org> Sent: Tuesday, October 16, 2001 2:56 PM Subject: toolbar/menubar > Hello all... I have a page where I use java to pop up a window from a <a > href>: for example: .. <a href="edit.jsp?cn=<%=custName%>&sn=<%=suppNum%>" > target="_blank">Edit</a> .. What I would like to know is there anyway of > specifying the size of the window opened and is there anyway of disabling some > attributes of the window object..for instance -- no menubars, toolbars, > scrollbars..etc... all help is greatly appreciated! jags > > ... > > You have to change the href to a javascript function call, then code the > (client-side) javascript function to do a window.open where you can set all > those attributes: > > <a href='Javascript:edit_record()'> > > <!-- Note that in reality you want to put these JS funcs in HTML HEAD section > --> > <SCRIPT language="Javascript"> > function edit_record() > { > // set url (GET method only works) then open popup window > var url = "some-url?some-params&some-values"; > editrec_win = window.open(url, "win_editrec", > "screenX=10,screenY=10,height=500,width=740,"+ > "menubar=1,resizable=1,scrollbars=1,location='_top'"); > // screenX/Y - start coords for window, menubar etc, 1=ON 0=OFF > > // now put focus on new window (or refocus on reused window) > if (window.focus && editrec_win) { editrec_win.window.focus(); } > } > </SCRIPT> > > You could, of course, just put the window.open code directly in the href if you > wanted to, I just like to use functions because it's much neater. > > You can also write the anchor tag like this: > > <A href='Javascript:void(0)' > > > > > [Edit Record]</A> > > hope that helps. > > david hall. > > |