View Full Version : Pop it Menu - Contain Forms ?

09-18-2008, 09:19 PM
1) Script Title: Pop it

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/popit.htm

3) Describe problem: I'm trying to add a Form to the menu that 'pops' :) but not having much luck as it throws a javascript error, and the menu goes away when you try and type in the box.

is this just not possible, or is there a easy fix? :D

09-18-2008, 09:25 PM
Please provide the code or URL of your site so that we can see what needs to be done.


09-18-2008, 10:30 PM

Its a bit complex, as I'm using it inside a ajax/php script, everything works well except the form.

I'm looping and building a table, each one has the menu but its unique to the value of the data being pulled in the loop for that users table.

Inject the javascript

linkset['.$user.']="<a href=\"/&userid='.$user.'\" title=\"Edit '.$first.'s settings\">Edit '.$first.'</a>"
linkset['.$user.']+="<form id=\"searchPOI\" name=\"searchPOI\" onsubmit=\"xajax_searchPOI(xajax.getFormValues(searchPOI));return false;\"><input type=\"text\" name=\"POISearch\" onfocus=\"select();\" id=\"POISearch\" value=\"Search POI\"><input type=\"submit\" value=\"Search\"></input></form>"

Build the $

$menu="<a href=\"#\" onMouseover=\"showmenu(event,linkset[$user])\" onMouseout=\"delayhidemenu()\">$first</a>";

Build the output.

<td align='center'>$menu</td>

Render ...

$objResponse->assign('updateMyDIV', 'innerHTML', $output);