Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the WWW-Mechanize CPAN distribution.

Report information
The Basics
Id: 5323
Status: resolved
Priority: 0/
Queue: WWW-Mechanize

People
Owner: Nobody in particular
Requestors: rhumphre [...] us.ibm.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



To: bug-www-mechanize [...] rt.cpan.org
Subject: Re: www::mechanize - suggestion and question
From: Randy Humphrey <rhumphre [...] us.ibm.com>
Date: Fri, 13 Feb 2004 13:45:55 -0700

Message body is not shown because sender requested not to inline it.

Hello Andy, Here's my suggestion for frame support to www::mechanize. I've made changes based on the recent 0.72 version, and have marked my comments with a 'frame_sup' flag. In a nutshell, I've used the FramesReady version of LWP::UserAgent, and converted the HTTP::Response's into tree form with HTTP::Response::Tree. I allowed another interface into www::mechanize called 'frame', where the caller can select the frame they wish to work with after a GET, FOLLOW_LINK, etc. I also took a portion of code from the 'request' subroutine and made it into it's own _handle_response internal routine. That allows it to be used by both 'response' and 'frame'. Please keep in mind that I'm in no way a subject matter expert on frames, and it's entirely possible that my solution is flawed. I just went with what I've learned from mechanize, FramesReady and HTTP::Response::Tree, and it seems to work. Randy Humphrey Andy Lester <andy@petdance.com> 01/30/2004 10:04 AM To: Randy Humphrey/Austin/IBM@IBMUS cc: Subject: Re: www::mechanize - suggestion and question Show quoted text
> I've also come up with a FRAME routine that sets the requested frame > number. This is based on a previous version of www::mechanize, probably > needs to be updated:
That's very cool. If you can make a patch for it against the latest version, and then send it to bug-www-mechanize@rt.cpan.org, I'll take a look at it. Others have asked for frame handling. Show quoted text
> <select name="origCountry" class="input1" name="sel1" > onChange="switchBtn(this)">
I assume this problem is that the JavaScript in switchBtn() is doing some magic stuff. xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance
RT-Send-CC: petdance
I think this approach to frame handling may be more appropriate for publishing seperately, perhaps in WWW::Mechanize::FramesReady. Right now Mech already has frame support that works well enough for many people: the "find_links()" function finds links in <frame> src attribute. Switching our base class from LWP::UserAgent to LWP::UserAgent::FramesReady may be too radical for project. Also, what happens in your implementation looks similiar: you select a frame and follow it through. Either way, you have to know ahead of time that you are hitting a frameset, and which page to follow. I'm CC'ing Andy, another developer, on this in case he wants to disagree with me about this. :) Mark