Jump to content

ThunderAI

Members
  • Posts

    102
  • Joined

  • Last visited

Everything posted by ThunderAI

  1. I have a window (1) that has an iframe (2) and that iframe (2) opens a new iframe (3) and iframe (3) opens a window (4). How do I get the child window to get information from iframe 3? Its not perfect design, but I've tried to reference the iframe (3) name directly, use parent.document, window.parent.document, etc but cant seem to get to the object or get the child window to recognize iframe (3) name. What javascript syntax is correct? Thanks.
  2. All, Did something recently change with Chrome that prevents a user from omni-scrolling an iframe with the middle mouse button? It was possible to utilize the middle mouse button to omni-scroll the content of an iframe but it is no longer possible. It works in Firefox but not in Chrome. Is there a better way to allow a user to scroll the content of an iframe that preserves the screen coordinates of that frame? A quick example <iframe src="page.php" scrolling="yes" width="100" height="100" ></iframe> page.php <img src="test.png" width="300" > What should happen is that since the image is larger than the iframe size I should be able to click and hold the middle mouse button down on the iframe and scroll in any direction, this is no longer possible. What are some ways to fix that? Thanks.
  3. How would I go about changing an xml file with custom tags. All i want to do is open the file, change some numbers and save the file. I'd rather not make an XML scheme for the file and do it that way. for example, I have a file with many tags like this: <tag x="3364.994" y="599.9155" z="0.3324151" /> and I want to alter the x and y values based on some criteria. What would be the best approach to do that? Thanks.
  4. Masonry without the jQuery worked like a charm. Thank you very much for the information. Didn't even knew Masonry existed!
  5. I have committed a crime, I need to float tables near each other to setup a dynamic grid that shows a summary of different database records. One table for each database record. The problem is that the tables will not nest into a nice grid pattern but rather create large gaps in the layout. The tables are all different lengths, and all have the float:left property. Now I know it isn't desired to use tables for layout, but I can't figure out a better way to do this. Any suggestions on how I can get the tables to layout properly and create no empty gaps? Thanks.
  6. How would I do that? onsubmit="openchild600('<?php echo $functionpage;?>','MarkasArchieved')" How would I do that before submit and then have the form submit to that new window?
  7. Yes there is only one menuitem_home. Did something recently change where you MUST call submit by the form ID? this works: document.getElementById('redirect_form_3').submit(); but this wont document.redirect_form_3.submit(); also, this has a really odd consequence in that form targets to new windows wont work. it will ALWAYS go to a new tab regardless s of what I tell it to do. BUT if I click an actual form submit button i will get the window in the right location and proper window size Here is the window problem that will produce two windows function openmapchild(file,window) { childWindow=open(file,window,'status=1,toolbar=0,location=0,menubar=0,directories=0,resizable=0,scrollbars=1,height=700,width=800'); if (childwindow.opener == null) childwindow.opener = self; } <form style="margin-bottom:0;" action="<?php echo $functionworkorderpage;?>" method="POST" name="Workorderreportform" id="Workorderreportform" target="ViewWorkOrder" onsubmit="openmapchild('<?php echo $functionworkorderpage;?>','ViewWorkOrder');" > <input type="hidden" NAME="recordid" ID="recordid" value="<?php echo $disid;?>"> <table border="0" cellpadding="0" cellspacing="0" class="table_bottom_right_container_button" /> <tr> <td class="table_button_bullet_right_dark1_normal" onclick="javascript:document.getElementById('Workorderreportform').submit();" /> </td> <td class="table_button_bullet_lead_dark1_normal" /> <input type="submit" value="Work Order" width="10" class="table_button_bullet_lead_dark1_normal"> </td> <td class="table_button_bullet_gap_dark1_normal" onmouseover="ddrivetip('Open Work-Order');" onmouseout="hideddrivetip();"/> <span class="table_button_bullet_input_dark1_normal"> WO </span> </td> <td class="table_button_bullet_tail_dark1_normal" onmouseover="ddrivetip('Open Work-Order');" onmouseout="hideddrivetip();"/> </td> </tr> </table> </form>
  8. Something has gone very wrong with Google Chrome as of late or I'm missing something. Something that I know worked not too long ago now doesn't work at all and produced an error message that makes no sense to me. <form style="margin: 0px; margin-bottom:0px; margin-top:-1px;" name="menuitem_home" id="menuitem_home" method="POST" action="index.php" /> <input type="hidden" name="menuitemid" value="index.php" /> <table class="Navigationv5table" border="0" cellpadding="1" cellspacing="1" width="<?php echo $icons_width;?>" height="<?php echo $icons_height;?>" onclick="javascript:document.menuitem_home.submit();toggle('navigationdisplaypanel');" /> <tr> <td width="100%" height="100%" align="center" valign="middle"> <img src="images/_interface/menu_icon_home.png"> </td> </tr> <tr> <td align="center" valign="middle"> <font size="3" color="#FFFFFF"> Home </font> </td> </tr> </table> </form> When you click on the table the form should submit, but i get the error. The only way around the error is to create a submit button and click on it. That wont work for what I want to do here and this used to work. What is going on to cause it to generate the error: Uncaught TypeError: Object #<HTMLCollection> has no method 'submit' Thanks.
  9. I am using tables to do a layout of a page and I'd like the tables to float around the other tables but the float: command does not quite do what I am looking for. It creates gaps between the tables the size of surrounding tables and does not fill in the gaps like I think it should. what is the process for making tables or a div float around other div and fill in spaces? like presume you have the following [][][][][][] | [][][][][][][][][] | [][][][][][][][][] | [][][][][][][][][] [][][][][][] | [][][][][][] How do I force the bottom two tables to be besides the larger one and below the top left one?
  10. I am looking for advice on the best way to achieve the following: say you have a player at a given x,y that can be moved to another x,y. The player is on a map that is a grid of 38x38 squares, furthure say you can see a total of 64 squares (8x8 grid). There are an unlimited number of map grids (chunks) which are related to each chunck by a field north, east,west, and south where the value in the field is the ID of the chunk next to it in that direction. If there were no chunks you could just search the database for all squares within sight of the player, but this process is more complicated with chunks as a simple search does not result in all viewable sqaures because some would be in different chunks. How do I find the squares that are viewable in a different chunk from my players perspective? Thanks for anything you can help me with.
  11. This "works", but its certainly not correct: Does someone have a polygon that has a defined color style in the correct format? Thanks. //Create a Placemark and append it to the document $node = $dom->createElement('Placemark'); $placeNode = $docNode->appendChild($node); $placeNode->setAttribute('id',$tmpid); $nameNode = $dom->createElement('name','PolygonName'); $placeNode->appendChild($nameNode); $descNode= $dom->createElement('description', 'test'); $placeNode->appendChild($descNode); $lineNode = $dom->createElement('Polygon'); $placeNode->appendChild($lineNode); $exnode = $dom->createElement('extrude', '100'); $lineNode->appendChild($exnode); $outerboundnode = $dom->createElement('outerBoundaryIs'); $lineNode = $lineNode->appendChild($outerboundnode); $ringnode =$dom->createElement('LinearRing'); $lineNode = $lineNode->appendChild($ringnode); $almodenode =$dom->createElement(altitudeMode,'relativeToGround'); $lineNode->appendChild($almodenode); $coorNode = $dom->createElement('coordinates',$locationstring); $lineNode->appendChild($coorNode);
  12. Does someone have a PHP script that will create a polygon for a KML file? For the life of me I can't seem to get the cost to work so it shows up in Google Earth. Something is very wrong with the code and there are no samples on the internet I can find that show a completed polygon in PHP. Thanks
  13. How do I do this? It only does the first nine records and wont cycle through the many records in the second dimension. Thanks. // External Loop is 1 - 9 // Internal Loop is 0 - whatever it is //$muarray_s[0] = $facility_id; //$muarray_d[$external_loop][$interal_loop] = $objfields['139339_date']; //$muarray_t[$external_loop][$interal_loop] = $objfields['139339_time']; //$muarray_i[$external_loop][$interal_loop] = $objfields['139339_main_id']; //$array_of_mu[$external_loop][$interal_loop] = $checklist_item_disc; echo "Begin Draw Runway Image Function <br>"; echo "Establish Array Looping Procedure"; for ($j=0; $j<10; $j=$j+1) { // External Loop // This is actually the Condition not the mu for ($k=0; $k<count($array_of_mu); $k=$k+1) { // Internal Loop // This is the Mu Value; echo "Mu Value is ".$array_of_mu[$j][$k]."<br>"; } }
  14. How do I find out how large a dimension of an array is? I have an array with an X and a Y coordinate, and in the 3rd dimension I store it as the value of an ID. so an array might be x,y,560; x,y,415, etc. I can run a counter within the loop to determine the total number of iterations of the loop, but that isn't an accurate picture of how large the 3rd dimension of the array is.
  15. How do you suggest I do it then? If I have a Date field and a time field and need to find entries before a certain date and time, I can force one side back together by a stretotime function to make a timestamp, but I can't do that in the SQL expression, or can i? For example; I could have the inspection date and time combined prior to executing the SQL, but the discrepancy would still be in date and time. So you would need an SQL statement that created a new column called datetime or something to sort the discrepancy. Unless what your saying is to go back to the actual strucutre design and change everything to a timestamp and have the script combine the user input into one datetime filed that is a timestamp.
  16. I need some help figuring out how you would limit an SQL search result list to only those items that occurred prior to a different date and time. For example, assume you do an inspection looking for problems/discrepancies and you record those discrepancies into the database and I want to find all discrepancies that were repaired prior to a specific date and time. I was thinking this: $sql = "SELECT * FROM tbl_139_327_sub_d_r WHERE discrepancy_repaired_inspection_id = '".$discrepancy_id."' AND discrepancy_repaired_date <= '".$tempinspdate."' AND discrepancy_repaired_time <= '".$tempinsptime."' ORDER BY discrepancy_repaired_date, discrepancy_repaired_time"; Would this work, or would I end up missing some results like if something was fixed on a previous day, but it happened to be after the given time thus not being returned. How would I do this querry?
  17. What technique is required to make a mousedown and mouse up trigger once the mouse has been moved? For example, I'd like to trigger a function on mouse down, let it continue to run while the mouse button is down even when the mouse is bring moved (ie drawing a shape), and stop drawing when the mouse is up. Would I need to have a function mouse over and then check for mouse down in the function or what trick would work?
  18. This code works in Firefox and Chrome but does not work in IE. It will scroll verticle with the page but as the page scrolls horizontal the floating div will not. function zxcWWHS(){ if (document.all){ zxcCur='hand'; zxcWH=document.documentElement.clientHeight; zxcWW=document.documentElement.clientWidth; zxcWS=document.documentElement.scrollTop; if (zxcWH==0){ zxcWS=document.body.scrollTop; zxcWH=document.body.clientHeight; zxcWW=document.body.clientWidth; } } else if (document.getElementById){ zxcCur='pointer'; zxcWH=window.innerHeight-15; zxcWW=window.innerWidth-15; zxcWS=window.pageYOffset; } zxcWC=Math.round(zxcWW/2); return [zxcWW,zxcWH,zxcWS]; } window.onscroll=function(){ var img=document.getElementById('fred'); if (!document.all){ img.style.position='fixed'; window.onscroll=null; return; } if (!img.pos){ img.pos=img.offsetTop; } img.style.top=(zxcWWHS()[2]+img.pos)+'px'; }
  19. Can one assume that Parent.Parent.document.getelementbyID would not work and it has to be done via a function?
  20. I have a form in an iframe: action="_iframe_submitpoint_sn.php" method="post" target="formresults"> target="formresults" is an iframe within the iframe. On "_iframe_submitpoint_sn.php" I have a javascript function that is suppose to change the content of a field outside of the first iframe. What should that .GetElementID look like? I've tried Top, parent, but I can't seem to find the magical combination. Thanks for your help
  21. I have never seen this before so I'm stumped as to what the problem is: General Problem: I am submitting a form to an iframe, something I've done a number of times in other code without problems, but I'm having no luck this time and I'm not sure what is wrong. The code below shows is two forms. One called "SelectIslandForm" and one called "MapControlForm2". "SelectIslandForm" works as it should, althouigh it does not have to submit any data as everything is done via javascript. It has a combobox that has an ajax call associated with it that places a form into <td ID="MapControls"> via the InnerHTML method. What should happen is when I click the submit button on form "MapControlForm2", the form should POST the information to the "_iframe_getisland.php" (reloading iFrame "layouttableiframecontent" in the process); however, the form POST contains no data. The POST does not even know that ID="formsubmit" is equal to 1. It literally knows nothing as if it didn't send any information. This is how it is in both Firefox and Google Chrome. In Internet Explorer, the form POST knows the answer to any input in that was added in the AJAX dynamic inputs but does not know that ID="formsubmit" is equal to 1. What could possibly be causing the form to not POST all information or only posting the new fields called from the AJAX page in IE? I'm dumb founded. This is the relevent section of the main page. <td width="290" align="left" valign="top" colspan="2" ID="IslandControls" NAME="IslandControls" bgcolor="#030201"> <form NAME="SelectIslandForm" ID="SelectIslandForm"> <input type="hidden" NAME="IslandID" ID="IslandID" size="3" value="1"> <input type="hidden" NAME="MainMenuID" ID="MainMenuID" size="3" value="1"> <input type="hidden" NAME="SubMenuID" ID="SubMenuID" size="3" value="1"> <TABLE width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td colspan="3"> </td> </tr> <tr> <td colspan="3" background="images/topicsbg.gif"> <font color="#000000" FACE="monospace" size="2">Islands</font> </td> </tr> <tr> <td colspan="3" bgcolor="#092123" align="left" valign="top"> <?php // Display Islands List ui_islands_list("all", "no", "ISLANDNAME", "combobox", ""); ?> </form> <form ID="MapControlForm2" NAME="MapControlForm2" method="post" action="_iframe_getisland.php" target="layouttableiframecontent"> <input type="text" ID="islandid_js"> <input type="text" ID="formsubmit" value="1"> <input class="formsubmit" type="button" name="button" value="submit" onclick="javascript:document.MapControlForm2.submit()"> </td> </tr> <tr> <td ID="MapControls" NAME="MapControls"> Map Layer Controls </td> </form> </tr> </table> </td> Here is the content of the AJAX page: include("includes/header.inc"); $field_id = $_GET["islandid"]; //echo "Field ID: ".$field_id; ?> <div NAME="IslandMapLayers" ID="IslandMapLayers" border="1" style="position:absolute; left:724px; top:140px; width:290px; height:500px; z-index: 1;overflow:auto;"> <TABLE width="100%" border="1" cellpadding="0" cellspacing="0"> <tr> <td colspan="2" background="images/topicsbg.gif"> <font color="#000000" FACE="monospace" size="2"> Island Layers </font> </td> </tr> <tr> <td> <?php // Display Islands List ui_layors_list($field_id, "no", "ISLANDLAYORS", "checkbox", ""); ?> </td> </tr> <tr> <td colspan="2" background="images/topicsbg.gif"> <font color="#000000" FACE="monospace" size="2"> Island MapPoints </font> </td> </tr> <tr> <td> <?php // Display Islands List ui_mappoints_cp1($field_id); //ui_mappoints_list($field_id, "no", "ISLANDLAYORS", "checkbox", ""); ?> </td> </tr> </table> </div>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.