2010/4/6 Jeremy Thomerson <[email protected]>
> Please make sure that your JS files are loading. I suspect you may be
> getting a 404 when loading the JS because you are not referencing them
> correctly (you're using a relative URL, which may not work depending on
> where your panel is placed).
>
I belive that de url is fine, becouse my panel is placed in the same place
than the Page parent, and it works fine on Page parent. I will check this
out again.
Few days ago, a friend was trying to make work JS on panel, he was doing a
JQuery datePicker, but he can't do it work on panels. Then he left the
project. He comment me that wicket's YUI datePicker desapeared fastly on
panels, it doesnt wait the click on the date of the user.
I believe those things are related, if my ToggleHighLigh.js works, the
datepicker by transitivity will works too
>
> Also, where is the JS that adds the onclick handler that highlights a row
> when it is clicked? I'm assuming it much be "ToggleHighLigh.js"?
>
It is in that file, it contains a onClick JQuery function ->
${this}.toggleClass("myClass").
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
> On Tue, Apr 6, 2010 at 5:41 PM, Daniela Valero
> <[email protected]>wrote:
>
> > Hi everybody
> >
> > I'm having a problem with my call to javascript from a panel. The problem
> > is
> > tah javascript does not work (if i call it from a page it works fine)
> >
> > I'm doing this:
> >
> > <wicket:head>
> > <script language="JavaScript1.2"
> > src="views/js/jquery-1.3.2.min.js"></script>
> > <script language="JavaScript1.2"
> > src="views/js/ToggleHighLigh.js"></script>
> > </wicket:head>
> >
> > <p class="row">Click to toggle</p>
> > <p class="row highLightedRow">highlight</p>
> > <p class="row">on these</p>
> > <p class="row">paragraphs</p
> >
> >
> > When I click the <p> element it should call ToggleHighLigh.js, and add a
> > css
> > background.
> >
> > I tried calling the javascript from Page parent, but it isn't work
> >
> > What I'm missing?
> >
> >
> > --
> > | Daniela Valero
> >
> > "No hay vientos favorables para quien no sabe a donde quiere ir!
> >
>
--
| Daniela Valero
"No hay vientos favorables para quien no sabe a donde quiere ir!