|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
BUG found on FAQ create dynamic drop down menu
Hi
I found this bug when running the download example for creating the multiple dynamic drop down menus. It was found that the program was running when i had the register_globals =on. I have tried on another machine with register_globalls = off and it was not working as it should. Is it possible to give a suggestion how to convert the program without having register_globals =on? thanks |
|
#2
|
|||
|
|||
|
RE: BUG found on FAQ create dynamic drop down menu
link, code?
|
|
#3
|
|||
|
|||
|
RE: BUG found on FAQ create dynamic drop down menu
here is the link
http://www.ashleyit.com/rs/jsrs/select/php/select.php you can download the code from there this is the forum link http://codewalkers.com/faq/10/33.html |
|
#4
|
|||
|
|||
|
RE: BUG found on FAQ create dynamic drop down menu
i checked out that code, and it looks like it was written so that it would work with register_globals off. What doesnt work about it since you made the switch?
|
|
#5
|
|||
|
|||
|
RE: BUG found on FAQ create dynamic drop down menu
well, on the jsrsServer.php in function
function jsrsDispatch($validFuncs ) { it tries to build the functions to load the data from the database $func = jsrsBuildFunc($validFuncs); This is not executed and the "function +builds +as+ empty +string" error message appears when i run the program. I am using php v5.0.1 |
|
#6
|
|||||
|
|||||
|
RE: BUG found on FAQ create dynamic drop down menu
I think i see where the problem is. jsrsDispatch() calls jsrsBuildFunc(), which needs a global value $F. If $F is not present, it will return an empty string. I dont see it defined anywhere. Anyone else familiar with this and knows where $F comes from?
php Code:
|
|
#7
|
|||
|
|||
|
RE: BUG found on FAQ create dynamic drop down menu
I understand what you are trying to say. Can I have some more help?
<script language = javascript> function contextPOST( rsPage, func, parms ){ var d = new Date(); var unique = d.getTime() + '' + Math.floor(1000 * Math.random()); var doc = (jsrsBrowser == "IE" ) ? this.container.document : this.container.contentDocument; doc.open(); doc.write('<html><body>'); doc.write('<form name="jsrsForm" method="post" target="" '); doc.write(' action="' + rsPage + '?U=' + unique + '">'); doc.write('<input type="hidden" name="C" value="' + this.id + '">'); // func and parms are optional if (func != null){ doc.write('<input type="hidden" name="F" value="' + func + '">'); if (parms != null){ if (typeof(parms) == "string"){ // single parameter doc.write( '<input type="hidden" name="P0" ' + 'value="[' + jsrsEscapeQQ(parms) + ']">'); } else { // assume parms is array of strings for( var i=0; i < parms.length; i++ ){ doc.write( '<input type="hidden" name="P' + i + '" ' + 'value="[' + jsrsEscapeQQ(parms[i]) + ']">'); } } // parm type } // parms } // func doc.write('</form></body></html>'); doc.close(); doc.forms['jsrsForm'].submit(); } </script> This is jsrsClient.js function contextPOST and has a hidden type F name. |
|
#8
|
|||
|
|||
|
RE: BUG found on FAQ create dynamic drop down menu
k
easy. Go into that function for jsrsBuildFunc() and change: global $F; to global $_POST['F']; you may just be able to get away with $_POST['F'] (as a matter of fact, im pretty sure you can because its in a super global array.) Give it a shot. |
|
#9
|
|||||
|
|||||
|
RE: BUG found on FAQ create dynamic drop down menu
ok what you have told me i have changed it and work fine but there is another problem i cannot figure it out.
This is the function php Code:
So $F = $_POST['F'] works fine, the first option list loads perfect, on the second time it reads the first option parameter but it does not pass it into the method. The problem that i have found was that the $$Ptmp has a value and does not enter the while loop. Any help please? |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > BUG of FAQ Dynamic drop down |
| Thread Tools | Search this Thread |