Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^4: Mouse action using SVG

by Ezhil4663 (Novice)
on Jul 30, 2016 at 18:40 UTC ( [id://1168874]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Mouse action using SVG
in thread Mouse action using SVG

It doesn't seem to work for me. I want to show the message which is stored in $message when I click the rectangle. I modified the code this way.
$svg->rectangle( x =>$x1, y =>$y1, width => $x2, height => $y2, style => { 'fill' => 'rgb(0, 0, 128)', 'stroke' => 'black', 'stroke-width' => 1, 'stroke-opacity' => 1, 'fill-opacity' => 1, }, ); $rectangle->attrib(onclick=>q{alert($message);});
Please correct me if I am wrong

Replies are listed 'Best First'.
Re^5: Mouse action using SVG (troubleshooting)
by tye (Sage) on Jul 30, 2016 at 19:26 UTC

    Of course that doesn't work. Did you look at the debug "console" of your browser to check for javascript errors? Why not? Did you look at the HTML that was produced/sent? Why not?

    After you've done that, you might also want to read the subtread at Re^7: perl dancer route template hashref pass complex json file to server issue (escape/filter).

    I'm not going to post code that I think will work for this case yet, as I think it is important for you to think more about this aspect of the problem before being handed code.

    - tye        

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1168874]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2024-04-19 20:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found