[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Get this to run off of the onClick=""

Posted on 2003-11-14
11
Medium Priority
?
229 Views
Last Modified: 2010-04-01
<jsp:include page="/pages/VertLink.jsp?link=benefits&pop_title=What+Benefits+Were+Authorized/Taken?&pop_img=sol_over/img_pop_screen_benefits.gif&pop_body=sol_over/BusinessRules_Benefits" flush="true"/>

I'm having trouble getting to work with onClick.. I know how to do it with href.. but I need onClick.  Thanks
0
Comment
Question by:dgelinas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 3
11 Comments
 
LVL 6

Author Comment

by:dgelinas
ID: 9749360
All it does it open a jsp popupwindow :)
0
 
LVL 35

Expert Comment

by:TimYates
ID: 9749406
onclick="window.location.href='/pages/VertLink.jsp?link=benefits&pop_title=What+Benefits+Were+Authorized/Taken?&pop_img=sol_over/img_pop_screen_benefits.gif&pop_body=sol_over/BusinessRules_Benefits'

I guess?
0
 
LVL 35

Accepted Solution

by:
TimYates earned 800 total points
ID: 9749419
sorry...

onclick="window.location.href='/pages/VertLink.jsp?link=benefits&pop_title=What+Benefits+Were+Authorized/Taken?&pop_img=sol_over/img_pop_screen_benefits.gif&pop_body=sol_over/BusinessRules_Benefits'"

Although what you have shown is a jsp:include which is done serverside, and an onclick is a clientside method using javascript...

javascript cannot directly interact with jsp tags....there is the network between them...

Tim
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 35

Expert Comment

by:TimYates
ID: 9749435
if you want a popup to that location, try:

<SCRIPT language="JavaScript">
<!-- Begin
  var myWindow ;
  var myLocation ;

  function popupFunc()
  {
      myLocation = '/pages/VertLink.jsp?link=benefits&pop_title=What+Benefits+Were+Authorized/Taken?&pop_img=sol_over/img_pop_screen_benefits.gif&pop_body=sol_over/BusinessRules_Benefits' ;
      var winWidth = 650 ;
      var winHeight = 580 ;

      var posLeft = ( screen.width - winWidth ) / 2 ;
      var posTop = ( screen.height - winHeight ) / 2 ;

      window.open( myLocation, 'mywindow',
                          'width=' + winWidth + ',height=' + winHeight +
                          ',top=' + posTop + ',left=' + posLeft +
                          ',resizable=yes,scrollbars=yes,toolbar=no,titlebar=no,' +
                          'location=no,directories=no,status=no,menubar=no,copyhistory=no' ) ;
    }
  }

// end -->
</SCRIPT>

<a href="#" onclick="popupfunc()">Woo!</a>
0
 
LVL 6

Author Comment

by:dgelinas
ID: 9749559
I'm trying this and I'm getting objected expected?

  function popupFunc()
  {
      myLocation = '/pages/VertLink.jsp?pop_img=sol_over/img_pop_screen_benefits.gif&pop_body=sol_over/BusinessRules_Benefits' ;
      var winWidth = 650 ;
      var winHeight = 580 ;

      var posLeft = ( screen.width - winWidth ) / 2 ;
      var posTop = ( screen.height - winHeight ) / 2 ;

      window.open( myLocation, 'mywindow',
                          'width=' + winWidth + ',height=' + winHeight +
                          ',top=' + posTop + ',left=' + posLeft +
                          ',resizable=yes,scrollbars=yes,toolbar=no,titlebar=no,' +
                          'location=no,directories=no,status=no,menubar=no,copyhistory=no' ) ;
    }
  }
0
 
LVL 14

Assisted Solution

by:kennethxu
kennethxu earned 800 total points
ID: 9750320
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 9750344
and this is the code it generates:

<!-- TWO STEPS TO INSTALL POPUP WINDOW:

   1.  Paste the first into the HEAD of your HTML document
   2.  Use the code to open the popup page on your site  -->

<!-- STEP ONE: Copy this code into the HEAD of your HTML document  -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">
<!-- Idea by:  Nic Wolfe (Nic@TimelapseProductions.com) -->
<!-- Web URL:  http://fineline.xs.mw -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=650,height=580,left = 187,top = 94');");
}
// End -->
</script>


<!-- STEP TWO: Use the following link to open the new window -->

<A HREF="javascript:popUp('="/pages/VertLink.jsp?link=benefits&pop_title=What+Benefits+Were+Authorized/Taken?&pop_img=sol_over/img_pop_screen_benefits.gif&pop_body=sol_over/BusinessRules_Benefits')">Open the Popup Window</A>

<!-- Script Size:  0.73 KB  -->
0
 
LVL 6

Author Comment

by:dgelinas
ID: 9751330
I'm doing a jsp popup from an include. I wouldn't need a popup code generator to do a simple html popup
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 9752949
jsp is server side language is executed at the server. it CANNOT popup client side windows. javascript is client side language that is and should be used for browser popup window.

it's just a popup windows, why does it have to do with jsp include. we might be able to better help you if you can give us more detail of your problem.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What monsters are hiding in your child's room? In this article I will share with you a tech horror story that could happen to anyone, along with some tips on how you can prevent it from happening to you.
It’s time for spooky stories and consuming way too much sugar, including the many treats we’ve whipped for you in the world of tech. Check it out!
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question