Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Dynamic content w/o refresh

by socketdave (Curate)
on Sep 13, 2005 at 20:38 UTC ( #491688=note: print w/replies, xml ) Need Help??


in reply to Dynamic content w/o refresh

Javascript is going to be your best bet for this, and is outside the scope of this site. Check out this site for more information on js: http://www.w3schools.com/js/js_intro.asp

Update:  I just tried out the module that CountZero mentioned. It's very slick and worth a look, especially if you have something complex to do and are already pretty familiar with Perl.

Replies are listed 'Best First'.
Re^2: Dynamic content w/o refresh
by pg (Canon) on Sep 13, 2005 at 22:16 UTC

    It is also worth to check out the concept of XML Island. Basically data needed for your HTML page comes as a block of XML (within the same HTML file).

    Java Script has basic DOM support and that's how you get data from your XML island. In this case, the configuration of those dropdown just comes as data.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://491688]
help
Chatterbox?
[ambrus]: marto: no, not that way. if you just want to test for an existing id attribute, then write *[@id] , or you can match a regexp to the value of that attribute like *[@id=~/something/ ]
[marto]: ambrus, thanks I ended up going with '//*[starts- with(@id, "thread_")]...
[ambrus]: Sometimes it's easier to just match elements in ways other than xpath, like directly with perl code.
[marto]: this is a cheap hack, a script that doesn't need to run for long, using WWW::Mechanize:: Firefox to drive some awful interface.
[marto]: if it were anything more serious I'd spend more time looking into it properly :P

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (10)
As of 2016-12-08 10:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (140 votes). Check out past polls.