• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using onload instead of onclick

 
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have two buttons inmy jsp with yes or no value. I want to get rid of both the buttons and always do what the button does when yes is clicked.

How do I replace the following code

<input type="button" value="YES" class="frm_button_short"
onclicck="calculateStartTime();parent.frames[0].location.href='geoZoneMaintenance.do?requestAction=prepareMap';setAction('execute','home.do?inquireAnswer=true');"/>
<input type="button" value="NO" class="frm_button_short"
onclicck="parent.frames[1].location.href='home.do?inquireAnswer=false'"/>

I have tried using onload but that doesn't seem to work.
Thanks
Imad
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please be sure to post Javascript questions in the HTML/Javascript forum. I have moved this there for you.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What trouble are you having....

basic idea



Eric
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic