Hello, I give a very simple HTML page with a very little Javascript. I would klike to do two things :
   1) Read in a PyQt application the javascript variable nom.
2) Define a slot wich will tell to the PyQt application that the function affiche() has been called.

Best regards and sorry for this question but JavaScript-PyQt is very hard I understand for me.
Christophe

CODE
==============================
<html>
   <head>
       <script type="text/javascript">
           nom = '';
           function affiche(){
               for(var i=0; i<document.images.length;i++){
document.images[i].onclick=function(){nameImage(this.alt)}
               }
           }
           function nameImage(text){
               nom = text;
               test()
           }
       </script>
   </head>

   <body onload="affiche()">
<img src="im_1.jpg" name="images1" width="256" height="192" border="1" alt="im_1"> <img src="im_2.jpg" name="images2" width="609" height="457" border="1" alt="im_2">
   </body>
</html>
im_1 im_2
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to