JavaScript - Help!! Click A Submit Button In Parent Page Upon Closing A Pop Up Child Page
I want to implement a javascript function where a submit button will be submitted from the parent page each time I close a child page. Please let me know what I did wrong in my code and please elaborate your answer so that I could understand it better. Thank you so much for your help.
I have the following jscript code but it is now working. Code: window.onunload = submitParent; function submitParent() { var doc = window.opener.document, theForm = doc.getElementById("finalForm"); theField = doc.getElementById("finalSelected"); theForm.submit(); theField.trigger('click'); } My form from the parent page is as follow. I want my jscript to just click on the submit button once. Code: <form id = "finalForm "name= "finalForm" method="POST" action=""> <input type="Submit" id = "finalSelected" name="finalSelected"/> Similar TutorialsI have home page with session close button and 10 child window link and i am opening all child window.All child windows should close after clicking on session close button. Code bellow <html> <script type="text/javascript"> openWins = []; curWin = 0; function openWin(page) { openWins[curWin++] = window.open(page,'_blank'); } function closeAll() { for(var i=0; i<openWins.length; i++) if (openWins[i] && !openWins[i].closed) openWins[i].close(); } window.onunload = closeAll; </script> <body > <input type="button" onClick="openWin('http://www.google.com');" value="Open PopUps"> <input type="button" onClick="closeAll('http://www.google.com');" value="Close PopUps"> </body> </html> Hi. Please help. I have a credit card donation page and what I wanted to do is after they click the submit button and transaction is successfult I wanted to capture the donation amount they enter from the donation page and show it to the next page. I know that is possible but I just don't know how to do it. I am new in Javascript and still consider as a baby. Can someone please help? Thanks in advance.
Hey all, I'm trying to make it so that when a user clicks on a radio button, the image that is related to the radio button is displayed next to it (without reloading the page). At the moment all it shows is the image related to the currently saved option, which I'd like to keep on page load. Is this possible? If so, I'd appriciate any help. Here is my code for the radio buttons. Thanks. Code: <tr valign="top"> <td id="community-legal-services-logo-selection"> <p><label><?php _e('<strong class="table_tags">Display the following Community Legal Services logo:</strong>'); ?></p> <p><label for="cls-mono"> <input class="" id="cls-mono" name="cls_logo" type="radio" value="cls_mono" <?php if($general_options['cls_logo'] === 'cls_mono'){ echo 'checked="checked"'; } ?> /> <?php _e('Mono'); ?></label> </p> <p><label for="cls-color"> <input class="" id="cls-color" name="cls_logo" type="radio" value="cls_color" <?php if($general_options['cls_logo'] === 'cls_color'){ echo 'checked="checked"'; } ?> /> <?php _e('Colour'); ?></label> </p> <p><label for="cls-none"> <input class="" id="cls-none" name="cls_logo" type="radio" value="cls_none" <?php if($general_options['cls_logo'] === 'cls_none'){ echo 'checked="checked"'; } ?> /> <?php _e('None'); ?></label> </p> <p> <label><?php _e('<span class="table_tags">Link to the Community Legal Services website<span>'); ?></label> </p> <p> <input class="large_input_box" id="cls-link" name="cls_link" type="text" value="<?php echo $general_options['cls_link']; ?>" /></label> </p> </td> <?php if($general_options['cls_logo'] && $general_options['cls_logo'] !== 'cls_none'){ ?> <td> <img id="community-legal-services-logo-preview" class="image-preview" src="<?php echo $general_options['cls_logo_path']?>" /> </td> <?php } ?> </tr> this is my code ______________________________________________________________ <pega:when test="$mode-input"> <script language="JavaScript"> function showNextButton() { handleClientEvent('SERVER','MakeScoreOrder','','-1'); /* fetches the data */ var submitClicked = "<p:r n='pyWorkPage.PFRSData.SubmitClicked' />"; var submitClicked = submitClicked.replace(/^\s\s*/, '').replace(/\s\s*$/, ''); var msg = "<p:r n='pyWorkPage.PFRSData.HasMessages' />"; var msg = msg.replace(/^\s\s*/, '').replace(/\s\s*$/, ''); if (submitClicked == "" || msg =="true") { toggleSubmitBtn(0); } else if (submitClicked == "true" || msg =="false") { toggleSubmitBtn(1); } } function toggleSubmitBtn(status) { var submitButton=document.actionForm.submitButton; if(submitButton) { var parentTable=pega.u.d.findParentTable(submitButton); if(parentTable) if(status) { if(parentTable.style.display=='none' || parentTable.style.display=='') { parentTable.style.display='inline'; document.actionForm.submitButton.disabled=false; } } else { parentTable.style.display='none'; document.actionForm.submitButton.disabled=true; } } } </script> <button onClick="showNextButton();" id="PISSubmit" style="vertical-align:middle;"> <span class='buttonLeft'></span> <span class='buttonMiddle'> <span class='buttonText' onmouseover="this.className='buttonTextHover'" onmouseout="this.className='buttonText'">Submit</span> </span> <span class='buttonRight'></span> </button> </pega:when> ___________________________________________________________ On clicking PISsubmit button it should fetch data and display the next button(submitButton).. but on first click nothing happens on second click it fetches the data and third click it displays Next(submitButton)button. Kindly help !! Note: its in pega application. Hey: I have several "submit" buttons on a form. I want users to be able to hit the "enter" key to submit the form. The page used to "post" the information checks for specifically what form button was pushed to submit the form before executing the appropriate code. I am automatically submitting the page when the enter key is hit, but it is defaulting to the first option of executed code in the post page. Example - I have an "update" button and a "delete" button on the form. On the post page, I first check to see if the delete button was hit. When I press enter on the form, it simply answers yes to the first question (did they click the delete button), and the code is executed. I really wanted to emulate that the update button was hit. So -- is there a way to hit the enter button, and in the js code, mandate that it was the "update" button that was clicked? Thanks. Folks I'm using the code below to create a pop-up search box that finds text strings on a contents page. The contents page contains a list of hyperlinks each of which opens a PDF document in the same window. The search box does exactly what it's intended to do, but the problem is this: if the user clicks on "Find next" or "Find previous" once the PDF document is open, an error occurs; the same error occurs if the user then navigates back to the contents page and clicks on "Find next" or "Find previous". I'm thinking the solution must be to get the search box to close as soon as the PDF document opens, but how do I achieve this? Thanks Remster Code: <html> <head> <title>Search this page</title> <script language=JavaScript> var rng = dialogArguments.document.body.createTextRange(); rng.collapse(); function findnext(){ if (document.all.strSearch.value.length < 1) { alert("Please enter text to find."); document.frmSearch.strSearch.focus(); } else { var searchval = document.all.strSearch.value; rng.collapse(false); if (rng.findText(searchval, 1000000000)) { rng.select(); } else { alert("Finished searching page."); rng.select(false); document.frmSearch.strSearch.focus(); } } } function findprevious(){ if (document.all.strSearch.value.length < 1) { alert("Please enter text to find."); document.frmSearch.strSearch.focus(); } else { var searchval = document.all.strSearch.value; rng.collapse(true); if (rng.findText(searchval, 1000000000, 1)) { rng.select(); } else { alert("Finished searching page."); rng.select(false); document.frmSearch.strSearch.focus(); } } } </script> </head> <body bgColor=buttonface> <form name=frmSearch onsubmit="findnext();return false;" onsubmit="findprevious();return false;" action="" method=post> <table cellSpacing=0 cellPadding=0 border=0> <tr> <td style="font-size: 12px; font-family: Arial" vAlign=top noWrap align=left> <input id=strSearch style="margin-left: 15px; margin-top: 14px; width: 249;" name=strSearch><br> <button style="margin-left: 15px; margin-top: 12px; width: 120px; height: 25px;" accessKey=f onclick=findnext(); name=btnFindNext>Find next</button> <button style="margin-left: 9px; margin-top: 12px; width: 120px; height: 25px;" accessKey=f onclick=findprevious(); name=btnFindPrevious>Find previous</button></br> </td> </tr> </table> </form> </body> </html> How could I open a page/popup after closing one? The objective is to log the user out if they haven't Logged out or clicked Logout. I am sure there is a simple way to do this. None of my ideas work. The only answer I could come with (after testing the whole day...) IE(any version), Firefox, and other browsers don't support this idea, due to the fact that the user clicked close and you can't impose things on them. Hello, I don't know if this can be done in Javascript, or requires any other language but i was wondering if this would be possible. I would like to embed this Javascript code in to a PHP file and then for it to run automatically upon the PHP file loading: Code: <td class="smallDesc"> <a name="fb_share" type="button_count" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script> </td> The Javascirpt is the Facebook Share button that basically allows users that have Facebook to share the page there currently on in their Facebook status by pressing the button, but if there not logged in it shows the login page, not a problem just continue the script. The current button i which is what i want to load automatically in the PHP file is located here, to test the functionalilty just click "Share" button in blue.. http://watch-movies-online.anyfilman...-Movie-17.html To summarise, i would like the above Javascript code to execute automatically upon pageload of this PHP file.. http://www.watch-movies-online.anyfi...p://google.com. If that could be done, and if this also is possible.. i would like for the "Share" button on the external page that is loaded from the Javascript code above to be clicked automatically so in effect when ever someone visits the PHP page after clicking "Click Here to Watch/Stream 2012 Online For Free" on this page it will automatically load the Facebook Share box, and automatically click the "Share" Button and then close the page if possible, but not required. Please feel free to ask any questions, i'll be happy to answer. Thanks in advance. Best Regards, Jonathan. Hello all, I built a javascript accordian menu that works very well. However, after a menu is opened, I have to click on another menu to close the current one. I would like to be able to toggle opening and closing of a menu without having to interact with other menus. I appreciate any help! Here is the Javascript code: Code: var expandFirstItemAutomatically = false; // Expand first menu item automatically ? var initMenuIdToExpand = false; // Id of menu item that should be initially expanded. the id is defined in the <li> tag. var expandMenuItemByUrl = true; // Menu will automatically expand by url - i.e. if the href of the menu item is in the current location, it will expand var initialMenuItemAlwaysExpanded = true; var dhtmlgoodies_slmenuObj; var divToScroll = false; var ulToScroll = false; var divCounter = 1; var otherDivsToScroll = new Array(); var divToHide = false; var parentDivToHide = new Array(); var ulToHide = false; var offsetOpera = 0; if(navigator.userAgent.indexOf('Opera')>=0)offsetOpera=1; var slideMenuHeightOfCurrentBox = 0; var objectsToExpand = new Array(); var initExpandIndex = 0; var alwaysExpanedItems = new Array(); var dg_activeItem = null; function popMenusToShow() { var obj = divToScroll; var endArray = new Array(); while(obj && obj.tagName!='BODY'){ if(obj.tagName=='DIV' && obj.id.indexOf('slideDiv')>=0){ var objFound = -1; for(var no=0;no<otherDivsToScroll.length;no++){ if(otherDivsToScroll[no]==obj){ objFound = no; } } if(objFound>=0){ otherDivsToScroll.splice(objFound,1); } } obj = obj.parentNode; } } function showSubMenu(e,inputObj) { if(this && this.tagName)inputObj = this.parentNode; if(inputObj && inputObj.tagName=='LI'){ divToScroll = inputObj.getElementsByTagName('DIV')[0]; for(var no=0;no<otherDivsToScroll.length;no++){ if(otherDivsToScroll[no]==divToScroll)return; } } hidingInProcess = false; if(otherDivsToScroll.length>0){ if(divToScroll){ if(otherDivsToScroll.length>0){ popMenusToShow(); } if(otherDivsToScroll.length>0){ autoHideMenus(); hidingInProcess = true; } } } if(divToScroll && !hidingInProcess){ divToScroll.style.display=''; otherDivsToScroll.length = 0; otherDivToScroll = divToScroll.parentNode; otherDivsToScroll.push(divToScroll); while(otherDivToScroll && otherDivToScroll.tagName!='BODY'){ if(otherDivToScroll.tagName=='DIV' && otherDivToScroll.id.indexOf('slideDiv')>=0){ otherDivsToScroll.push(otherDivToScroll); } otherDivToScroll = otherDivToScroll.parentNode; } ulToScroll = divToScroll.getElementsByTagName('UL')[0]; if(divToScroll.style.height.replace('px','')/1<=1)scrollDownSub(); } if(e || inputObj) { if(dg_activeItem) { dg_activeItem.className = dg_activeItem.className.replace('coursefinder_activeItem',''); } var aTags = inputObj.getElementsByTagName('A'); if(aTags.length>0) { aTags[0].className = aTags[0].className + ' coursefinder_activeItem'; dg_activeItem = aTags[0]; if(aTags[0].href.indexOf('#') == -1 || aTags[0].href.indexOf('#') < aTags[0].href.length-1){ return true; } } } return false; } function autoHideMenus() { if(otherDivsToScroll.length>0){ divToHide = otherDivsToScroll[otherDivsToScroll.length-1]; parentDivToHide.length=0; var obj = divToHide.parentNode.parentNode.parentNode; while(obj && obj.tagName=='DIV'){ if(obj.id.indexOf('slideDiv')>=0)parentDivToHide.push(obj); obj = obj.parentNode.parentNode.parentNode; } var tmpHeight = (divToHide.style.height.replace('px','')/1 - slideMenuHeightOfCurrentBox); if(tmpHeight<0)tmpHeight=0; if(slideMenuHeightOfCurrentBox)divToHide.style.height = tmpHeight + 'px'; ulToHide = divToHide.getElementsByTagName('UL')[0]; slideMenuHeightOfCurrentBox = ulToHide.offsetHeight; scrollUpMenu(); }else{ slideMenuHeightOfCurrentBox = 0; showSubMenu(); } } function scrollUpMenu() { var height = divToHide.offsetHeight; height-=15; if(height<0)height=0; divToHide.style.height = height + 'px'; for(var no=0;no<parentDivToHide.length;no++){ parentDivToHide[no].style.height = parentDivToHide[no].getElementsByTagName('UL')[0].offsetHeight + 'px'; } if(height>0){ setTimeout('scrollUpMenu()',0); }else{ divToHide.style.display='none'; otherDivsToScroll.length = otherDivsToScroll.length-1; autoHideMenus(); } } function scrollDownSub() { if(divToScroll){ var height = divToScroll.offsetHeight/1; var offsetMove =Math.min(15,(ulToScroll.offsetHeight - height)); height = height +offsetMove ; divToScroll.style.height = height + 'px'; for(var no=1;no<otherDivsToScroll.length;no++){ var tmpHeight = otherDivsToScroll[no].offsetHeight/1 + offsetMove; otherDivsToScroll[no].style.height = tmpHeight + 'px'; } if(height<ulToScroll.offsetHeight)setTimeout('scrollDownSub()',0); else { divToScroll = false; ulToScroll = false; if(objectsToExpand.length>0 && initExpandIndex<(objectsToExpand.length-1)){ initExpandIndex++; showSubMenu(false,objectsToExpand[initExpandIndex]); } } } } function initSubItems(inputObj,currentDepth) { divCounter++; var div = document.createElement('DIV'); // Creating new div div.style.overflow = 'hidden'; div.style.position = 'relative'; div.style.display='none'; div.style.height = '1px'; div.id = 'slideDiv' + divCounter; div.className = 'slideMenuDiv' + currentDepth; inputObj.parentNode.appendChild(div); // Appending DIV as child element of <LI> that is parent of input <UL> div.appendChild(inputObj); // Appending <UL> to the div var menuItem = inputObj.getElementsByTagName('LI')[0]; while(menuItem){ if(menuItem.tagName=='LI'){ var aTag = menuItem.getElementsByTagName('A')[0]; aTag.className='slMenuItem_depth'+currentDepth; var subUl = menuItem.getElementsByTagName('UL'); if(subUl.length>0){ initSubItems(subUl[0],currentDepth+1); } aTag.onclick = showSubMenu; } menuItem = menuItem.nextSibling; } } function initSlideDownMenu() { dhtmlgoodies_slmenuObj = document.getElementById('coursefinder'); dhtmlgoodies_slmenuObj.style.visibility='visible'; var mainUl = dhtmlgoodies_slmenuObj.getElementsByTagName('UL')[0]; var mainMenuItem = mainUl.getElementsByTagName('LI')[0]; mainItemCounter = 1; while(mainMenuItem){ if(mainMenuItem.tagName=='LI'){ var aTag = mainMenuItem.getElementsByTagName('A')[0]; aTag.className='slMenuItem_depth1'; var subUl = mainMenuItem.getElementsByTagName('UL'); if(subUl.length>0){ mainMenuItem.id = 'mainMenuItem' + mainItemCounter; initSubItems(subUl[0],2); aTag.onclick = showSubMenu; mainItemCounter++; } } mainMenuItem = mainMenuItem.nextSibling; } if(location.search.indexOf('mainMenuItemToSlide')>=0){ var items = location.search.split('&'); for(var no=0;no<items.length;no++){ if(items[no].indexOf('mainMenuItemToSlide')>=0){ values = items[no].split('='); showSubMenu(false,document.getElementById('mainMenuItem' + values[1])); initMenuIdToExpand = false; } } } else if(expandFirstItemAutomatically>0 ){ if(document.getElementById('mainMenuItem' + expandFirstItemAutomatically)){ showSubMenu(false,document.getElementById('mainMenuItem' + expandFirstItemAutomatically)); initMenuIdToExpand = false; } } if(aTag.className.indexOf("active") == -1) { aTag.onclick = showSubMenu; } else { aTag.onclick = scrollUpMenu; } mainItemCounter++; } if(expandMenuItemByUrl) { var aTags = dhtmlgoodies_slmenuObj.getElementsByTagName('A'); var currentLocation = location.pathname; for(var no=0;no<aTags.length;no++){ var hrefToCheckOn = aTags[no].href; if(hrefToCheckOn.indexOf(currentLocation)>=0 && hrefToCheckOn.indexOf('#')<hrefToCheckOn.length-1){ aTags[no].className = aTags[no].className + ' coursefinder_activeList'; initMenuIdToExpand = false; var obj = aTags[no].parentNode; while(obj && obj.id!='coursefinder'){ if(obj.tagName=='LI'){ var subUl = obj.getElementsByTagName('UL'); if(initialMenuItemAlwaysExpanded)alwaysExpanedItems[obj.parentNode] = true; if(subUl.length>0){ objectsToExpand.unshift(obj); } } obj = obj.parentNode; } showSubMenu(false,objectsToExpand[0]); break; } } } if(initMenuIdToExpand) { objectsToExpand = new Array(); var obj = document.getElementById(initMenuIdToExpand) while(obj && obj.id!='slidedown_menu'){ if(obj.tagName=='LI'){ var subUl = obj.getElementsByTagName('UL'); if(initialMenuItemAlwaysExpanded)alwaysExpanedItems[obj.parentNode] = true; if(subUl.length>0){ objectsToExpand.unshift(obj); } } obj = obj.parentNode; } showSubMenu(false,objectsToExpand[0]); } } Dear Madam/Sir, I would greatly appreciate any help. I am working on this site: http://www.pathology.ubc.ca/Path_UBC...Professor.html. The list of names on the right hand side is conencted to the iframe, left hand side. By clicking on individual name the eprofile is populated in the iframe. Everything works fine but what I would like to add is some kind of extention to the url so we can externaly link directly to each these profiles. Please let me know if this is something that can be done? Many thanks, Debbie After a parent checkbox has been selected and the user changes their mind and just unchecks the Parent checkbox I need to figure out how to automatically uncheck the child checkboxes as well. Code: <script type="text/javascript"> function toggleMe(a){ var e=document.getElementById(a); if(!e)return true; if(e.style.display=="none"){ e.style.display="block" } else { e.style.display="none" } return true; } </script> <script type="text/javascript"> $('input[type=checkbox]').change(function() { // get id of the current clicked element var id = $(this).attr('id'); // find elements with classname 'parent-<id>' and (un)check them var children = $('.parent-' + id).attr('checked', $(this).attr('checked')); }); </script> <body> <form name='f1' action='#'> <h2 align="center">Test</h2><br> <br> <input id="s1" type="checkbox" onclick="return toggleMe('para1')" value="1">1 <br> <div id="para1" style="display:none"> <input id="b"class="parent-s1" type="checkbox" name="cb1"/> <label for="cb1">a</label><br> <input id="b" class="parent-s1"type="checkbox" name="cb1"/> <label for="cb1">b</label> <br> </div> <input type="checkbox" onclick="return toggleMe('para2')" value="2">2 <br> <div id="para2" style="display:none"> <input id="b"class="parent-s2" type="checkbox" name="cb2"/> <label for="cb2">a</label><br> <input id="b" class="parent-s2"type="checkbox" name="cb2"/> <label for="cb2">b</label> <br> </div> <script type='text/javascript'> function Cb2Rb( setRef ) { this.boxGroup = setRef; for( var i=0, len=setRef.length; i<len; i++ ) setRef[ i ].onclick=( function(inst, idx){return function(){inst.scan(idx)}} )(this, i); this.scan=function(index) { if( this.boxGroup[ index ].checked ) for(var i=0, g=this.boxGroup, len=g.length; i<len; i++) if( i != index ) g[i].checked = false; } } new Cb2Rb( document.forms.f1.cb1 ); new Cb2Rb( document.forms.f1.cb2 ); </script> <script type='text/javascript'> function sub_delete{ if (typeof document.checks.cb.length === 'undefined') { /*then there is just one checkbox with the name 'cb' no array*/ if (document.checks.cb.checked == true ) { document.checks.submit(); return 0; } }else{ /*then there is several checkboxs with the name 'cb' making an array*/ for(var i = 0, max = document.checks.cb.length; i < max; i++){ if (document.checks.cb[i].checked == true ) { document.checks.submit(); return 0; } } } }//sub_delete end </script> <script type='text/javascript'> $('input[class*="parent"]').change(function(){ var cls = '.' + $(this).attr('class') + ':checked'; var len = $(cls).length; var parent_id = '#' + $(this).attr('class').split('-')[1]; // 3. Check parent if at least one child is checked if(len) { $(parent_id).attr('checked', true); } else { // 2. Uncheck parent if all childs are unchecked. $(parent_id).attr('checked', false); } }); </script> <br><br><br> <input type="button" class="button" onclick="return toggleMe('para10')" value="Submit"> After open a child window, I would like to keep parent window on focus. I tried self.focus(), set new window in blur() as well as setting the setInterval, none of them works in either Firefox or IE. I think this question relates to the opening window in tab rather than in new window. Actually, in Firefox, it was opened in tab and in IE it was opened in new window. hi there. i have a classic asp page that is using the winhttprequest object to get the contents of website from a different server. Then i modify the html i get to suit my needs.. save it to a file, and then finally, i display this stuff in an IFRAME. (i wrapped a div tag around the iframe so technically, i'm doing something like: "divtabframe.innerHTML = '<IFRAME SRC='myserver/somepage.html'></IFRAME>) My problem is that when i refresh the main page, i want the iframe to also display the latest data. It does get the latest data from the external site and its saved in "somepage.html". But the iframe isn't updated unless i explicitly right-click inside the frame and manually select refresh. I have added a <meta http-equiv="refresh" content="30"> line to make it auto refresh on it's own. But the users find it annoying that the page refreshes while they're reading it. It would be ideal if when they refresh the main page, the iframe gets updated too. or i could create a new button too... as long as both pages are updated i did find this solution on a different website: document.getElementById(FrameID).contentDocument.location.reload(true); My page inside the iframe is ultimately "local" so it sounds like the above code should work, but i'm not sure what event would be best to trigger this javascript... and i still need a way to refresh the main page too. thanks. ... but only in $%&/$ IE... you can see the parent page dropdowns when the page loads, but when the iframe loads it appears to overwrite the parent page completely... works fine in Chrome and FF. Here's the page EDIT: sorted. appears I had to clear the floats, or something Hey, I'm looking for a way to get a variable from a parent window in a child window. I'm aware that you can write the variable to a hidden field and then get the field's value in the child window, but I'm looking for a cleaner (all JS preferable) way of doing this. Something like this, but I believe this is an out-dated solution: Code: var str = window.opener.str; alert(str); Any solutions? Hi I wanted to control parent page form popup. For example, I have a page: http://www.cmela.com/zz.php When i open a popup by clicking "Click Here to open popup page" and then on popup window, i wanted it to transfer parent page from making a click on a pop up window. Example is at: http://www.cmela.com/zz.php open pop up window, and then by clicking on a link on a pop up window i wanted my parent page to go to www.msn.com any help? Thanks Hello: I have the following div popup window: PHP Code: <div id='PopUp' style='display: none; position: absolute; height: auto; left: 13px; top: 10px; border: solid black 1px; padding: 10px; background-color: rgb(255,255,225); opacity:.95; text-align: justify; font-size: 12px; width: 70%; z-index:1200;'> <iframe id="mate\" frameborder=0 scrolling=yes width=100% src='client_edit/edit_client_data.php?customerid=$customerid' height=\"790\" align=\"left\"></iframe><br /> <div valign=\"top\" style='text-align: right; display: inline; position: absolute; left: 10px; top: 10px;'><a onmouseover='this.style.cursor=\"pointer\" ' style='font-size: 12px;' onfocus='this.blur();' onclick=\"document.getElementById('PopUp').style.display = 'none' \" ><span valign='left' style=\"text-decoration: underline;\" ><img border='0' src='images/the-delete.png' width='22' height='20' title='Close Window'></span></a> </div></div> the popup is opened from its parent page with the following onclick event: PHP Code: <a href="javascript:void(0)\" onmouseover=\"document.edit_info.src='images/edit-user-info2.png'\" onmouseout=\"document.edit_info.src='images/edit-user-info.png'\" onclick=\"document.getElementById('PopUp').style.display = 'block' \"><IMG SRC=\"images/edit-user-info.png\" NAME=\"edit_info\" width='40' height='40' title='Edit Customer Contacts' ALT=\"...\"></a> Now when the popup is closed, I would like the parent page to automatically refresh. I would appreciate some help on this. To close the popup, the following is invoked: PHP Code: <div valign="top\" style='text-align: right; display: inline; position: absolute; left: 10px; top: 10px;'><a onmouseover='this.style.cursor=\"pointer\" ' style='font-size: 12px;' onfocus='this.blur();' onclick=\"document.getElementById('PopUp').style.display = 'none' \" ><span valign='left' style=\"text-decoration: underline;\" ><img border='0' src='images/the-delete.png' width='22' height='20' title='Close Window'></span></a> </div> Hi, I have a small problem with a page I'm working on. I have an anchor tag inside a table that has a mouseover event that updates a contextual help box. I need to add a similar mouseover event to the anchor tag that does the same thing, but updates the help box with different text. The problem I have is that when the mouse is over the table, no matter if I move the mouse over the anchor, the help text only displays the message that is passed from the table's mouseover function call. I think the solution *may* be something to do with event bubbling, but I'm not exactly sure how to implement it. The code I'm dealing with is below: The code below is PHP. The table mouseover (for reference): Code: echo "<table class='cleanTable' width='100%' style='margin-top: 5px'"; echo " onMouseOver=\"updateHelpText('Message 1.');\" onMouseOut='clearHelpText();'>"; echo "<tr><th> </th><th> </th><th>First Name</th><th>Surname</th><th>Last Login</th></tr>"; The anchor mouseover: Code: echo "<tr class='cleanrow'><td><a href='newMember.php'><img border='0' src='images/icon_add.gif'></a></td><td></td>"; echo "<td colspan='3'><a class='workbenchLink' href='newMember.php' onMouseOver=\"updateHelpText('Message 2');\" onMouseOut='clearHelpText();'>Invite a new colleague...</a></td></tr>"; echo "</table>"; The function (javascript): Code: function updateHelpText(newText) { document.getElementById("helpBox").innerHTML = "<h4> " + newText + "</h4>"; } Any help with this would be great, thanks. Hi Experts, i have 2 JS array and i need to have dependency between them knowing that 1st Array has parent element of the 2nd one. i.e ARRAY1 ID VAL ID2 2 Dep1 10 3 Dep2 20 4 Dep3 30 ARRAY2 ID VAL ID2 PARENT 20 team1 11 10 21 team2 12 10 22 team3 13 20 23 team4 14 30 i need to have two different DDL's where when i choose VAL = Dep1 on ARRAY1 , i should see on the 2nd DDL only elements with parent corrsponding to Dep1 ( PARENT =10). how this can be possible thanks Hi all, I'm designing something to addon to an existing product. I'm struggling with some javascript problems. I want to submit a hidden field when you click on an image button, rather than it being an actual submit button. It's going to submit the value "1" to a PHP page, but I don't want it to actually have to GO to the PHP page, just submit it within the webpage. Is this possible? Thanks |