Computer Webmaster Gaming Console Graphics Forum

Welcome to the Computer Webmaster Gaming Console Graphics Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Webmaster Forum > Website Coding > Pear
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

Pear Pear programming, this is a very complex subject as with using pear with php can be a difficult task for some, so lets talk pear.

Google
Reply
 
LinkBack Thread Tools Display Modes
Old 05-20-2007, 5:34 PM   #1
Paolo Sala
 
Paolo Sala's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Livesearch: onchange events on firefox 2.x and iceweasel 2.x

Hi Mark, thank tou very, very and very much...

Mark Wiesemann ha scritto:
> I am sure. I don't lie to you. ;-)

Yes I know but... as far as my experience knows is unbelievable that
someone has different results and fear I'm getting crazy!!!

> Can you maybe put the test script somewhere online and post the URL of
> it here? That would make it easy for people to test it with different
> browsers on different platforms.

I would ask you the same... but I can try: I have an adsl with a static
IP so... even if with a very little bandwith but in effect I can try...
but if you have a php site I can send you the example or a patch for the
index.html and see if I have the same behaviour I have on my server.

> Opera 9 on Windows has also no problems here, the alert() window is shown.

I've no tried Opera 9... but I have tried IE6 and seems to have the same
behaviour than FF2.

In effect the onchange event fires on FF2 but fires only if I don't
select an element from the list. If I select an element from the list
nothing happens...

>> zizi:~# diff
>> /usr/share/php/tests/HTML_QuickForm_Livesearch/example/index.php
>> /var/www/prove/example/index.php
>> 27c27
>> < array('size' => '50')
>> ---
>>> array('size' => '50',

>> 'onchange'=>'alert(\'Hello, world!\');')
>> 37c37
>> < $form->addElement('text', 'required_field', 'errorTest', 'Some data:');
>> ---
>>> $form->addElement('text', 'required_field', 'errorTest',

>> array('onchange'=>'alert(\'Hello, world!\');'));

>
> Maybe this last line is just broken here in the email, but isn't the
> 'Some data:' parameter missing here? Maybe this breaks your whole page?

AFAIK the QF addElement takes in the fourth argument the attributes
array... is the original example wrong?

> (In my tests I had only added the event to line 27.)

I've modified the line 37 only to see if on FF2 the onchange event rise
on QF_text elements, and it does.

Thank you very much

Piviul
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Advertisements
Old 05-20-2007, 5:34 PM   #2
Mark Wiesemann
 
Mark Wiesemann's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Livesearch: onchange events on firefox 2.x and iceweasel 2.x

Hi Paolo,

Paolo Sala wrote:
> Mark Wiesemann ha scritto:
>> Can you maybe put the test script somewhere online and post the URL of
>> it here? That would make it easy for people to test it with different
>> browsers on different platforms.

> I would ask you the same...


http://www.markwiesemann.eu/tmp/livesearch/
(leaving the first input element after a modification should show an
alert() window saying "Test")

> AFAIK the QF addElement takes in the fourth argument the attributes
> array... is the original example wrong?


Yes, you're right it. I only saw the difference between the two lines
without checking the params.

I have opened a bug report about this.

Regards,
Mark

--
http://www.markwiesemann.eu
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Old 05-20-2007, 5:34 PM   #3
Jan Wagner
 
Jan Wagner's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default [PEAR] Re: Livesearch: onchange events on firefox 2.x andiceweasel 2.x

> Paolo Sala wrote:
> > Mark Wiesemann ha scritto:
> >> Can you maybe put the test script somewhere online and post the URL of
> >> it here? That would make it easy for people to test it with different
> >> browsers on different platforms.

> > I would ask you the same...

>
> http://www.markwiesemann.eu/tmp/livesearch/
> (leaving the first input element after a modification should show an
> alert() window saying "Test")


Hi there,

just tested the above page and the event fires when I changed text in
the field and pressed TAB or clicked with the mouse somewhere on the
page. I use firefox 2.0.0.3 on Linux (Debian etch). I also tested IE6 on
Windows XP and IE7 on Vista and Firefox 1.5 and 2.0 on Windows XP. They
all run fine.

Cheers Jan
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Old 05-20-2007, 5:34 PM   #4
Jan Wagner
 
Jan Wagner's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default [PEAR] Re: Livesearch: onchange events on firefox 2.x andiceweasel 2.x

> But Have you tried to select a element from the list?

Okay, this does not work in FF2.

> In effect if I write something without choosing a word from the
> livesearch list and press TAB or click with the mouse somewhere on the
> page, the event onchange is fired. But in effect the field is not
> changed: is ever the same empty value string.


Hmmh this problem seems to be known:

http://dev.rubyonrails.org/ticket/5179

Having looked around the net, I found some references to problems with
the name attribute. Could it be because of your id and name values not
matching?

Okay just tested the example myself. When I rename elementId from search
to 'Nome' in index.php and function search() to Nome() in
livesearch.class.php it works as expected.

Cheers Jan
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Old 05-20-2007, 5:34 PM   #5
Jan Wagner
 
Jan Wagner's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default [PEAR] Re: Livesearch: onchange events on firefox 2.xandiceweasel 2.x

> > Okay just tested the example myself. When I rename elementId from search
> > to 'Nome' in index.php and function search() to Nome() in
> > livesearch.class.php it works as expected.


It was not a fix, rather a short test ;-) Well, it does not update the
field anymore, too.

> Thank you very much Jan... you've done bingo!!! But... when I try your
> solution I get an error: remoteLiveSearch.Nome is not a function.
> Furthermore even if there are no errors in your solution, AFAIK it can't
> be applied because if you set the livesearch element name and livesearch
> elementId option having the same value you have two HTML input element
> with the same id (take a look to the html source of the page). And that
> is not an html valid code.


That is right.

> Anyway there is a bug, I have not a lot of experience and I don't know
> if I have to open a bug report, try to solve the bug and send a patch
> or... please someone can try help me?


Yeah, the bug must be somewhere in livesearch. The element name and id
should be the same. Setting it manually to search in this case, does not
work either so it seems to be the javascript somwhere, somehow ...

You should open a bug report.

Cheers Jan
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Featured Websites
Free Space
Free Space
Free Space Free Space
Reply
Tags: , , , ,




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
using FireFox on this forum MadKad Bugs And Feedback 9 08-07-2007 12:10 PM


Featured Websites




All times are GMT +1. The time now is 11:52 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98