• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

getting script error message when opening modal dialog

 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to open a modal window from current screen. The URL i give is
"myAction.do?action=value&reqParam1="+reqparamValue+"&reqParam2="+reqParam2Value

Values of reqParamValue and reqParam2Value are passed like this.
reqParamValue = document.getElementById('param1').value;
reqParam2Value = document.getElementById('param2').value;

The window open action is triggered by click on an image. This is giving an error alert saying Error while running scripts on this page.
But if i use the URL as
"myAction.do?action=value&reqParam1=1&reqParam2=2"
that is instead of taking values from proper elements, if i give some hard coded values it is working fine without errors.

Instead of that image i can change that to an anchor link also.
please help on this.

regards,
Surendarprabu.R
 
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi surendar,

If you use firefox and it's webdeveloper's pack, you would get a clear errormessage.

If you can't use that: post the generated html and your javascript-code.

Herman
 
surendar prabu
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am using IE6.0. and the code i have given in my previous post. And error message is, i am getting an alert, There is error on script running in this page. and it is asking for confirmation with a message. DO you wish to run scripts ont his page. This happens only in first case of my code. In the second case there is no error
 
surendar prabu
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Basically my problem is i am not able to attach the request parameters along with the URL.

Is there a way to do this?
 
Herman Schelti
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,



Does the element with id="param1" exist?
Did you check the value of reqParamValue ? (with an alert)
(Does it have any spaces in it?)

Herman
 
Come have lunch with me Arthur. Adventure will follow. This tiny ad:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic