![]() |
|
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. |
| |||||||
| 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. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| 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 | |||
|
| Advertisements |
| | #2 | ||
| 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 | |||
|
| | #3 | ||
| > 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 | |||
|
| | #4 | ||
| > 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 | |||
|
| | #5 | ||
| > > 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 | |||
|
| Featured Websites | ||||
|
![]() |
| Tags: events, firefox, iceweasel, livesearch, onchange |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
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 | ||||
|