JavaScript - Collaboration To Post A Javascript
I am hoping someone will be interested in helping widen the development of Namesets, a client side application that helps build associative indexes as alternatives to spreadsheet analyses.
I tried to attach a set of screenshots in an animated gif illustrating a 'nset' for the design of a building but it gets turned into a jpg and so doesn't work here - but it works here . This shows it as the basis for manipulating components and scenes in Google's Sketchup, but as far as I can see subjects and output are practically unlimited. The purpose of the collaboration would be to construct some sample input lists and output devices, as well as generally reviewing the application (btw - the code passes JSLint except in a very few - excusable! - places.) As the caption states the intention is to offer it in "post a javascript". Thanks Similar TutorialsFor the record, im a noob at javascript & if there was a lvl below noob id use it to Anyways, my code blow is supposed to automate on a website i use a quantity & submit with just one click using javascript. The help i got wasn't successful as it dosnt act as a URL or interact with the webpage & i need it to be used as a URL. My Goal is to make a simple php page which i already have & a list of links. Now the links will be made up of javascript as soon as i get a working example i can edit. When i click the links, on the webpage it automatically sets quantity & hits the Sell submit button for me, however it dosnt work & im desperate to get it fixed. On the webpage is a slider that sets the quantity, i can manually set quantity as we have to use a slider we click & drag left or right then we click Sell & it sells the type of drugs which is part of the game we wanted. I grabbed the POST info using Live Headers firefox plugin. I hope someone can fix this for me. Live Headers info: Code: POST /fiends.php drugtype=lsd&sqty=5201 Javascript Code: Code: 1."href="javascript: 2.var doc = document; 3.var aForm = doc.createElement("form"); 4.doc.getElementsByTagName("body")[0].appendChild(aForm); 5.aForm.setAttribute("action", "http://www.greedinc.com/fiends.php?drugtype=lsd&sqty=5201"); 6.aForm.setAttribute("method", "POST"); 7. 8.var aInput = doc.createElement("input"); 9.aForm.appendChild(aInput); 10.aInput.setAttribute("type", "hidden"); 11.aInput.setAttribute("name", "drugtype"); 12.aInput.value = "lsd"; 13. 14.aInput2 = doc.createElement("input"); 15.aForm.appendChild(aInput2); 16.aInput2.setAttribute("type", "hidden"); 17.aInput2.setAttribute("name", "sqty"); 18.aInput2.value = '5201'; 19.aForm.submit();"> As a reminder, The javascript i need will act as a URL on my own hosted php page. I will then open the PHP page as a sidebar in my browser which will be firefox. Then when im on the website in question on the specific page, in staid of click & dragging the slider thats part of the POST/Submit that changes the Quantity of what i want sell & then click Sell. I want the javascript acting as a URL to do that for me from the sidebar page. Really hope someone can fix this for me because I've been at it for nearly 3 weeks now & its starting to wear me down to a point where I'm eating Jelly Babies Actually I was trying to use this imagesearch code for one of my blog posts about cars, I want to embed the below codes one for BMW and one for Toyota in the blog post, individually if I place one of these codes they work fine but if I want to place them both together in 2 different blocks separately it doesn't work. Is there a way to achieve this, basically giving 2 different handlers. This will help me a lot - TIA. <script type="text/javascript" src="http://www.google.com/jsapi? key=ABQIAAAA1XbMiDxx_BTCY2_FkPh06RRaGTYH6UMl8mADNa0YKuWNNa8VNxQEerTAUcfkyrr 6OwBovxn7TDAH5Q"></ script><div id="TOYOTA">Loading...</div><script type="text/ javascript">google.load('search', '1');var imageSearch;function OnLoadSneha() { imageSearch = new google.search.ImageSearch(); imageSearch.setResultSetSize(google.search.Search.LARGE_RESULTSET); imageSearch.setRestriction (google.search.ImageSearch.RESTRICT_IMAGESIZE, google.search.ImageSearch.IMAGESIZE_MEDIUM); imageSearch.setSearchCompleteCallback(this, function(){ if (imageSearch.results && imageSearch.results.length > 0) {var contentDiv = document.getElementById('TOYOTA'); contentDiv.innerHTML = ''; var results = imageSearch.results; for (var i = 0; i < results.length; i++) { var result = results[i]; var imgContainer = document.createElement('div'); var title = document.createElement ('div'); var newImg = document.createElement('img'); newImg.src = result.tbUrl; var titleLink=document.createElement('a'); title.className=titleLink.className='gs-title'; titleLink.setAttribute ('href',result.url); titleLink.appendChild(document.createTextNode (result.titleNoFormatting)); title.appendChild(titleLink); imgContainer.appendChild(title); imgContainer.appendChild(newImg); contentDiv.appendChild(imgContainer); } function (imageSearch) { var cursor = imageSearch.cursor; var curPage = cursor.currentPageIndex; var pagesDiv = document.createElement('div'); for (var i = 0; i < cursor.pages.length; i++) { var page = cursor.pages[i]; if (curPage == i) { var label = document.createTextNode(' ' + page.label + ' '); pagesDiv.appendChild (label);} else {var link = document.createElement('a');link.href = 'javascript:imageSearch.gotoPage('+i+');';link.innerHTML = page.label; link.style.marginRight = '2px';pagesDiv.appendChild (link);}} var contentDiv = document.getElementById('TOYOTA'); contentDiv.appendChild(pagesDiv);} }}, null); imageSearch.execute ("TOYOTA");} google.setOnLoadCallback(OnLoadSneha);</script> <script type="text/javascript" src="http://www.google.com/jsapi? key=ABQIAAAA1XbMiDxx_BTCY2_FkPh06RRaGTYH6UMl8mADNa0YKuWNNa8VNxQEerTAUcfkyrr 6OwBovxn7TDAH5Q"></ script><div id="TOYOTA">Loading...</div><script type="text/ javascript">google.load('search', '1');var imageSearch;function OnLoadSneha() { imageSearch = new google.search.ImageSearch(); imageSearch.setResultSetSize(google.search.Search.LARGE_RESULTSET); imageSearch.setRestriction (google.search.ImageSearch.RESTRICT_IMAGESIZE, google.search.ImageSearch.IMAGESIZE_MEDIUM); imageSearch.setSearchCompleteCallback(this, function(){ if (imageSearch.results && imageSearch.results.length > 0) {var contentDiv = document.getElementById('TOYOTA'); contentDiv.innerHTML = ''; var results = imageSearch.results; for (var i = 0; i < results.length; i++) { var result = results[i]; var imgContainer = document.createElement('div'); var title = document.createElement ('div'); var newImg = document.createElement('img'); newImg.src = result.tbUrl; var titleLink=document.createElement('a'); title.className=titleLink.className='gs-title'; titleLink.setAttribute ('href',result.url); titleLink.appendChild(document.createTextNode (result.titleNoFormatting)); title.appendChild(titleLink); imgContainer.appendChild(title); imgContainer.appendChild(newImg); contentDiv.appendChild(imgContainer); } function (imageSearch) { var cursor = imageSearch.cursor; var curPage = cursor.currentPageIndex; var pagesDiv = document.createElement('div'); for (var i = 0; i < cursor.pages.length; i++) { var page = cursor.pages[i]; if (curPage == i) { var label = document.createTextNode(' ' + page.label + ' '); pagesDiv.appendChild (label);} else {var link = document.createElement('a');link.href = 'javascript:imageSearch.gotoPage('+i+');';link.innerHTML = page.label; link.style.marginRight = '2px';pagesDiv.appendChild (link);}} var contentDiv = document.getElementById('TOYOTA'); contentDiv.appendChild(pagesDiv);} }}, null); imageSearch.execute ("TOYOTA");} google.setOnLoadCallback(OnLoadSneha);</script> This is a must-read for all users posting to the JavaScript forum, especially if you're looking to get help. A lot of you are posting in a manner that makes it extremely difficult- if not impossible- to respond to. Below are a list of posting guidelines and tips we ask that you please read- and FOLLOW- when asking for help: 1) Type in a subject that summarizes your question! - The fastest way to turn off other members wanting to help you is to type an incomplete or silly subject for your post. Examples of poor subject titles include: - "Help!" - "I'm a newbie...please!" - "Is this possible using JavaScript?" - "loops" - "Urgent...deadline tomorrow!" - "A challenge for you JavaScript masters" The above subjects either have absolutely nothing to do with the question itself, or are grossly incomplete (ie: "loops"). When asking for help, enter a subject that summarizes your question, period! Don't use silly, incomplete, or "bait" subjects. 2) Be descriptive and articulate when asking your question! Some of you are posting as if we're all psychics, and are supposed to grasp your question with the little or confusing information you've provided in your question. We cannot read your mind, and putting up a post like "Can someone help me with arrays?" or "How can I get the slide-in slideshow to work on my site?" is not nearly enough information to go by. What exactly do you want to know about arrays? Which slide-in slideshow are you referring to (the one written by Bill Gates?)? Set us up with some crucial background information, what you want to do, and what the problem is. Be concise and precise. Also when posting, understand that you're trying to convince others to help you. Be articulate and have respect for the English language! Check for spelling/grammar mistakes, and try and format your question and code in an easily legible manner. Big tip: Use the preview button often. Bottom line- put yourself in our shoes, and try and phrase the question so it's clear and easy to respond to. 3) Do your homework first. Only post the part of the script you're having trouble with! There are generally two types of people- ones that simply dump their entire page or problem and expect everyone to spend hours solving everything for them, and those that do their own homework first, and only ask very specific, manageable questions. The later invariably gets more and better responses from others. When you're lazy, do not expect us to be hardworking for you. As an example, lets say you're working on a long script that uses the "switch" statement of JavaScript, and it's returning errors. You could either: i) Post the entire script and simply say "Please debug this script for me!" ii) Or, localize the problem yourself first and post instead "Can someone tell me the syntax of the switch statement in JavaScript?" The second question will get a LOT more quality responses, as it is concise, manageable, and not overwhelming. Remember, ask for the world, and you'll get nothing. Ask for a little, and you'll get a lot. 4) Use the search feature often to make sure your question isn't already answered- The longer this forum has been online, the more solutions it accumulates. Always search past posts first (using the search link to your upper right) to make sure your question isn't already answered. Use 1-2 keywords as the search terms. 5) Know the capabilities and limits of JavaScript before posting. Please familiarize yourself with what JavaScript can- and cannot do- before posting. Many people are posting JS questions that simply cannot be accomplished using the language, period. JavaScript is a client side language, and cannot manipulate the server end in any way, such as saving data to the server, accessing a database etc. JavaScript works strictly on the user end, such as popping up a window, applying an image rollover effect, or determining user screen resolution (*without* the ability to pass this info back to the server). If JavaScript is completely new to you, please familiarize yourself somewhat with the language, by visiting the below links - JavaScript questions and answers list - JavaScript tutorials - Advanced JavaScript tutorials - Pre-made JavaScripts (illustrates typical JS applications) 6) Be appreciative and follow up when getting a response. Everyone here is volunterring their time to help out others. The least you can do is be appreciative and follow up when getting a helpful response. If you've solved your problem, let people know so they don't continue spending time on your question. Saying a little "thank you" goes a long way. Hey peeps, I'm trying to use wget to access this website that uses javascript. The website is from my work. Basically I made a program that parses information from our payment page. It tells me how much I am being paid for the month. Anywho, the variables on the page are in javascript, and thats one language I'm not proficient at. I need to change the month that it gets the pay for. The default is the current month. But it can be changed to last month, and from the code I can tell that something has to be changed from "THIS_MONTH" to "LAST_MONTH", but I'm not sure how to properly do it. Posted below is the source code from the website. Please let me know how I can change that without actually having to click the button to change the scope to last month. And also, is there any way to change this in the post method, or any other method that wget uses? I only included the parts I thought could be relevant. Thanks guys! BTW, I think it pertains with g_FiltersMenuStr Code: <title>SupportSpace - Tech Support for Computers, Printer, Security, Gadgets...</title> <meta name = "description" content = "get immediate tech support for your PC / Computer, Printers, Outlook / Email Setup, Wireless, Networking, Anti-Virus & Security, Spyware, XP, Vista, I-Pod, MP3 Player Setup, Zune, Printer Setup, Backup Services for your Documents & Many other online live support"/> <meta name = "keywords" content = "online live tech support PC Computer Printers Outlook Email Setup Wireless Networking AntiVirus Security Spyware XP Vista IPod MP3 Player Zune Printer Setup Backup Services hardware software help chat"/> <meta name = "language" content = "English"/> <link REL="SHORTCUT ICON" HREF="/support/images//icons/shortcut_icon.ico"/> <script type="text/javascript">if(!JAWR){var JAWR = {};};;JAWR.jawr_dwr_path='/support/dwr';JAWR.dwr_scriptSessionId='CCA333F742C70F495236AA2C97D653D2';JAWR.app_context_path='/support';</script> <link rel="stylesheet" type="text/css" media="screen" href="/support/styles/31289092/bundles/common_connection.css" /> <link rel="stylesheet" type="text/css" media="screen" href="/support/styles/1893248551/bundles/sessionHistory.css" /> </head> <script type="text/javascript">if(!JAWR){var JAWR = {};};;JAWR.jawr_dwr_path='/support/dwr';JAWR.dwr_scriptSessionId='BF92335E3E86FC7586F1F5BFB96E81FB';JAWR.app_context_path='/support';</script> <script type="text/javascript" src="/support/scripts/122785183/bundles/common.js" ></script> <body class="supportspace"> <script type="text/javascript"> var jabberConnectorSrc = "/support/extra_scripts/1.23a1.6/flashconnector/jabberConnector.swf"; if (!!(window.attachEvent && !window.opera)){ document.write('\ <OBJECT id="jabberConnector" dontRewriteMe=true codeBase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" height="1" width="1" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">\ <PARAM value="'+jabberConnectorSrc+'" name="Src" />\ </OBJECT>'); } else{ document.write('<embed swliveconnect="true" name="jabberConnector" id="jabberConnector" src="'+jabberConnectorSrc+'" quality=low height="1" width="1" type="application/x-shockwave-flash"></embed>'); } </script> <!--[if lt IE 7]> <style> #dSSLogo{position:relative} </style> <![endif]--> <div id="dHeader"> <div id="dHeader_1" class="center s2DarkGray"> <div id="dSSLogo" onclick="document.location = 'http://www.supportspace.com/support/'"></div> <div class="rightLinks"> <div id="dHeaderLinks" style='display:none;' class='invisible'> <div class="dHeaderLink"><a class="mainlevel-trans" href="javascript:void(0);" id="dSigninMenu">Sign In</a></div> <div class="dHeaderLinksSep">|</div> <div class="dHeaderLink"><a class="mainlevel-trans" href="https://www.supportspace.com/support/affiliates.s2?aiu=UserRegistration" id="headerSecondMenu">Register</a></div> <div class="dHeaderLinksSep">|</div> <div class="dHeaderLink"><a class="mainlevel-trans" href="http://corporate.supportspace.com/about_us">About Us</a></div> <div class="dHeaderLinksSep">|</div> <div class="dHeaderLink"><a class="mainlevel-trans" href="http://www.supportspace.com/support/faq.s2" id="menuHelp">Help</a></div> </div> <div id="dHeaderLinksAfterLogin" class='visible'> <div id="dHeaderMailNotification"> <a id="nomailNotification" class="s2LightGray nounderline" href="http://www.supportspace.com/support/inbox.s2">(<span class="nbNewOfflineMessagesHeader">0</span>) <img src="/support/images/offline_messages/message_icon_grey_16x14.gif" alt="" title="" width="16" height="14" align="absmiddle" border="0"/></a> <a id="mailNotification" style="display:none" class="s2Blue nounderline" href="http://www.supportspace.com/support/inbox.s2">(<span class="nbNewOfflineMessagesHeader">0</span>) <img src="/support/images/offline_messages/message_icon_blue_16x14.gif" alt="" title="" width="16" height="14" align="absmiddle" border="0"/></a> </div> <div id="dHeaderWelcome" class="dHeaderWelcome">Hello </div> <div style="float:left;"> <table cellpadding=0 cellspacing=0 border=0> <tr> <td width="5">|</td> <td> <a id="dMySpaceMenu" class="mainlevel-trans" href="#">My Account</a> <ul id="dMySpaceMenuContent" class="menu" style="display:none;"></ul> </td> <td width="5">|</td> <td><a id="dSignOut" class="mainlevel-trans" href="http://www.supportspace.com/support/j_spring_security_logout">Sign Out</a></td> <td width="5">|</td> <td><a class="mainlevel-trans" href="http://corporate.supportspace.com/about_us">About Us</a></td> <td width="5">|</td> <td><a id="menuHelpAfter" class="mainlevel-trans" href="http://www.supportspace.com/support/faq.s2">Help</a></td> </tr> </table> </div> </div> </div> <div style="clear:both;"></div> </div> <div id="dHeader_2" class="center"> <div id="dHeaderMenus"> <div> <a href="http://www.supportspace.com/support/" onclick="this.blur()" title="SupportSpace homepage" tabindex="1" id="menuHome"> <img src="/support/images/header/home_btn_regular.gif" alt="" width="127" height="32"/> </a> </div> <div> <a href="http://www.supportspace.com/support/expert" onclick="this.blur()" id="menuExperts" title="Search for online experts"> <img src="/support/images/header/experts_btn_regular.gif" alt="" width="127" height="32"/> </a> </div> <div> <a href="http://www.supportspace.com/support/services" onclick="this.blur()" id="menuPackages" title="Search for featured support services"> <img src="/support/images/header/services_btn_regular.gif" alt="" width="127" height="32"/> </a> </div> </div> <div id="dSearchBox"> <div id="dSearchBoxQuery"> <input type="text" id="searchBoxQuery" style="color:#7C7C7C" name="searchBoxQuery" value="Search" onkeypress="submitEnter(this,event,runExternalSearch)"> </div> <div id="dSearchBoxGo"> <img id="dSearchBoxGoBtn" width="22" height="22" border="0" alt="Search" src="/support/images/header/search_icon_regular_22x22.gif" onmouseout="this.src='/support/images/header/search_icon_regular_22x22.gif'" onmouseup="this.src='/support/images/header/search_icon_regular_22x22.gif'" onmouseover="this.src='/support/images/header/search_icon_mouse_over_22x22.gif'" onmousedown="this.src='/support/images/header/search_icon_pressed_22x22.gif'" /> </div> <div style="clear:both;"></div> </div> </div> <div class="clearboth"></div> </div> <div id="dTemplateBody" class="center"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td class="leftPanel" > <div > <div class="getHelp box"> <div class="title"><img src="/support/images/header/menu_get_help.gif" width="170" height="27" alt="Get help on products"></div> <div class="s2Gray productList content"> <ul> <li class="product ellipsis"><a class="linkOnHover" href="http://www.supportspace.com/support/category/Virus_-_Spyware" title="Virus - Spyware">Virus - Spyware</a></li> <li class="product ellipsis"><a class="linkOnHover" href="http://www.supportspace.com/support/category/Printers" title="Printers">Printers</a></li> <li class="product ellipsis"><a class="linkOnHover" href="http://www.supportspace.com/support/category/PC_Support" title="PC Support">PC Support</a></li> <li class="product ellipsis"><a class="linkOnHover" href="http://www.supportspace.com/support/category/Windows" title="Windows">Windows</a></li> <li class="product ellipsis"><a class="linkOnHover" href="http://www.supportspace.com/support/category/Security" title="Security">Security</a></li> <li class="product ellipsis"><a class="linkOnHover" href="http://www.supportspace.com/support/category/Backup" title="Backup">Backup</a></li> <li class="product ellipsis"><a class="linkOnHover" href="http://www.supportspace.com/support/category/PC_to_PC_Transfer" title="PC to PC Transfer">PC to PC Transfer</a></li> <li class="product ellipsis"><a class="linkOnHover" href="http://www.supportspace.com/support/category/Wireless_Network" title="Wireless Network">Wireless Network</a></li> <li class="product ellipsis"><a class="linkOnHover" href="http://www.supportspace.com/support/category/Email_and_Internet" title="Email and Internet">Email and Internet</a></li> <li class="product ellipsis"><a class="linkOnHover" href="http://www.supportspace.com/support/category/Browsers" title="Browsers">Browsers</a></li> <li class="product ellipsis"><a class="linkOnHover" href="http://www.supportspace.com/support/category/iPod_and_MP3" title="iPod and MP3">iPod and MP3</a></li> <li class="product ellipsis"><a class="linkOnHover" href="http://www.supportspace.com/support/category/Camera_-_Photo" title="Camera - Photo">Camera - Photo</a></li> <li class="product ellipsis"><a class="linkOnHover" href="http://www.supportspace.com/support/category/Mobile_Phones" title="Mobile Phones">Mobile Phones</a></li> <li class="product ellipsis"><a class="linkOnHover" href="http://www.supportspace.com/support/category/Green_PC" title="Green PC">Green PC</a></li> </ul> </div> </div> <div class="box howdoesitwork s2Gray"> <div class="title"> <img src="/support/images/left_pannel/menu_how_it_works_170x43.gif" width="170" height="43" alt=" "> </div> <div class="steps"> <table width="100%" cellpadding="0" cellspacing="0"> <tr> <td><img src="/support/images/left_pannel/3_steps_1_icon_55x60.gif" width="55" height="60" alt=""/></td> <td valign="top"> <p><span class="title bold">1.Choose</span><br/> a service or an online expert.</p> </td> </tr> <tr height="5"></tr> <tr> <td><img src="/support/images/left_pannel/3_steps_2_icon_55x60.gif" width="55" height="60" alt=""/></td> <td valign="top"> <p><span class="title bold">2.Connect</span><br/> to the expert and watch your problem being solved.</p> </td> </tr> <tr height="5"></tr> <tr> <td><img src="/support/images/left_pannel/3_steps_3_icon_55x60.gif" width="55" height="60" alt=""/></td> <td valign="top"> <p><span class="title bold">3.Done</span><br/> Relax and rate your experience.</p> </td> </tr> </table> </div> </div> </div> </td> <td class="panelSpacer" > </td> <td class="rightPanel" > <div id="dBodyPage" class="bodyPage" > <script type="text/javascript" src="/support/scripts/N1461701270/bundles/session_history.js" ></script> <script type="text/javascript"> var gExternalParameterType = ""; var gSupportSessionId = ""; var gIsSupporter = true; var gError = false; var gExternalSessionFatalError = true; var gDefaultFilterList = {}; gDefaultFilterList['SESSION_DATE'] = ""; gDefaultFilterList['SESSION_STATUS'] = ""; gDefaultFilterList['SESSION_TYPE'] = ""; gDefaultFilterList['SUPPORT_SESSION'] = ""; gDefaultFilterList["SESSION_DATE"] = "THIS_MONTH"; gDefaultFilterList["SESSION_TYPE"] = "PAID"; var gSHistoryStrings = { error_feedback_add:"You cannot add feedback to this session.", error_feedback_fatal:"Required session is not availible. You cannot add feedback.", error_session_report_add:"You cannot edit the solution report for this session.", error_session_report_fatal:"Required session is not available. You cannot edit the solution report." } var g_FiltersMenuStr = { "SESSION_DATE":"Date", "SESSION_DATE.TODAY":"Today", "SESSION_DATE.YESTERDAY":"Yesterday", "SESSION_DATE.THIS_WEEK":"This week", "SESSION_DATE.LAST_WEEK":"Last week", "SESSION_DATE.THIS_MONTH":"This Month", "SESSION_DATE.LAST_MONTH":"Last month", "SESSION_DATE.LAST_6_MONTH":"Last 6 months", "SESSION_DATE.THIS_YEAR":"This year (2011)", "SESSION_DATE.LAST_YEAR_AND_EARLIER":"Earlier than (2011)", "SESSION_STATUS":"Status", "SESSION_STATUS.UNRESOLVED":"Unresolved", "SESSION_STATUS.ENDED_BEFORE_PAYMENT":"Ended before payment", "SESSION_STATUS.FORWARDED":"Forwarded", "SESSION_STATUS.DISPATCHED":"Dispatched", "SESSION_STATUS.RESOLVED":"Resolved", "SESSION_STATUS.UNCOMPLETED":"Uncompleted", "SESSION_STATUS.IN_PROGRESS":"In progress", "SESSION_STATUS.LEFT_OPEN":"Left Open", "SESSION_TYPE":"Type", "SESSION_TYPE.PAID":"Paid", "SESSION_TYPE.FREE_COUPON":"Free (Coupon)", "SESSION_TYPE.FREE_EXPERT":"Free (Expert)", "SUPPORT_SESSION":"Current Support Session", "DEFAULT_FILTER_MENU":"Back to default", "NO_FILTERS_MENU":"Clear all filters", "NO_FILTERS_NOTE":"No filters (All sessions)" }; var gSessionFeedbackHistoryUrl = "/support/sessionFeedbackHistory.s2"; var gSessionHistory = "/support/sessionHistory.s2"; var gSessionHistoryUrls = { filter_empty:"http://images.supportspace.com/support/images/common/empty.gif", filter_X:"http://images.supportspace.com/support/images/session_history/filter_X_mark.gif", filter_V:"http://images.supportspace.com/support/images/session_history/filter_V_select.gif", filter_arrow_white:"http://images.supportspace.com/support/images/session_history/filter_arrow_white.gif", filter_arrow_grey:"http://images.supportspace.com/support/images/session_history/filter_arrow_grey.gif" } var g_experts; </script> <div id="dSHistoryPage"> <div class="dSmallPreloaderContainer"><div id="dSmallPreloader" style="display:none;"><img src="http://images.supportspace.com/support/images//common/preloader_16x16.gif" alt=""></div></div> <h1 style="float:left">Session History</h1> <div class="clearboth"></div> <div id="dSHistoryContent"> <div id="dListBar" class="listBar"> <div id="dFiltersMenuButton">Filtered by: <img src="/support/images/session_history/filter_arrow_down.gif" alt=""/></div> <div id="dFiltersSelected"></div> <div class="displayedCounter">Displaying: 38</div> </div> <div id="dFiltersMenuContent"><div id="dFiltersMenuDivToReplace"></div></div> <div class="clearboth"></div> <div id="dSHistoryResults"> <script type="text/javascript"> var gSelectedFilters = {}; gSelectedFilters['SESSION_DATE'] = ""; gSelectedFilters['SESSION_STATUS'] = ""; gSelectedFilters['SESSION_TYPE'] = ""; gSelectedFilters['SUPPORT_SESSION'] = ""; gSelectedFilters["SESSION_DATE"] = "THIS_MONTH"; gSelectedFilters["SESSION_TYPE"] = "PAID"; (function(){ var dDisplayedCounter = $("dListBar") ? $("dListBar").down(".displayedCounter") : null; if(dDisplayedCounter){ dDisplayedCounter.update("Displaying: 38"); } }).defer(); var gSolutionReport; </script> <div class="dThreads"> <div id="dSessionHistoryError" style="display:none;"></div> <script type="text/javascript"> if (typeof(window.g_experts) == "undefined" || !window.g_experts){ window.g_experts = []; window.gIsAnExpertIsOnline = false; } g_experts.push({ id:193037, supporterDynamicDetails:{ online4Customer:{ customer:{ id:"" }, customerCookie:"" }, supporterDisplayPresenceStatusForExpectedCustoemr:"online", supporterDisplayPresenceStatus:"online" }, displayUserName:"", jabberUsername:"23a9ea173c4a7923ef41c9d6afa208d36ea1900f", photoUri:"193037_1273126504113.gif" }); </script> Hi, I am looking for some code that will do the following Form to post any URL to an iFrame and load said URL. I been told Javascript can do this, but I am also after the form bit as well if possible. I am trying to understand a button that calls a script without any onclick event, post or similar. I do not have a clue ... This is the code of the button Code: <div class="sNR"> <button type="button" class="sLR" id="gwt-debug-searchPanel-searchButton">Suchen</button> </div> From: Code: https://adwords.google.com/o/Targeting/Explorer?__u=1000000000&__c=1000000000&ideaRequestType=KEYWORD_IDEAS#search.none Is there any software that help would help me? PS: You need firebug or an equivalent to view the code. i've written a js function to find the difference between two dates. the format being used is dd/mm/yyyy hh:mm. The function returns correct value when give one set of values, but go wrong with another set. examples are given below. set 1 : Time 1 = 24/02/2011 09:30 , time 2 = 24/02/2011 16:00 Output is corret here. It gives 6 Hours & 30 Minutes (after converting the difference) set 2: Time 1 = 24/02/2011 09:30 , time 2 = 25/02/2011 16:00 Here, it gives 31 days, 6 Hours & 30 Minutes. My code is given below. Also the alert of dates display strange values. Don't know if it is timezone issue. I wonder what is going wrong here Code: function compareDateTime(frmtime,totime) { var date1 = new Date(frmtime); var date2 = new Date(totime); var diff = new Date(); alert(date1); alert(date2); diff = (date2.getTime()-date1.getTime()); if (diff<0) { alert("From Time cannot be later than To Time!"); return 0; } else if (diff==0) { alert("From Time cannot be equal with To Time!"); return 0; } else { return diff; } } The returned diff value is broken down as following: Code: if (diff>0) { days = Math.floor(diff / (1000 * 60 * 60 * 24)); diff -= days * (1000 * 60 * 60 * 24); hours = Math.floor(diff / (1000 * 60 * 60)); diff -= hours * (1000 * 60 * 60); mins = Math.floor(diff / (1000 * 60)); alert(days+","+hours+","+mins); return true; } Please Help... I use wget in Linux to follow spam links to download malware samples through the firewall, which will send them to a VM and if they are malware, start to block them in the firewall. This helps protect users that like to click everything. (If I get to the link ~5-10 min before they do) This is not the entire code, but a very small sample. I will attach the entire code as a text file. I have never seen JS code like this befo $=~[];$={___:++$,$$$$:(![]+"")[$],__$:++$,$_$_:(![]+"")[$],_$_:++$,$_$$:({}+"")[$],$$_$:($[$]+"")[$],_$$:++$,$$$_:(!""+"")[$],$__:++$,$_$:++$,$$__:({}+"")[$],$$_:++$,$$$:++$,$___:++$,$__$:++$};$.$_=($.$_=$+"")[$.$_$]+($._$=$.$_[$.__$])+($.$$=($.$+"")[$.__$])+((!$)+"")[$._$$]+($.__=$.$_[$.$$_])+($.$=(!""+"")[$.__$])+($._=(!""+"")[$._$_])+$.$_[$.$_$]+$.__+$._$+$.$;$.$$=$.$+(!""+"")[$._$$]+$.__+$._+$.$+$.$$;$.$=($.___)[$.$_][$.$_];$.$($.$($.$$+"\""+$.$$_$+$._$+$.$$__+$._+"\\"+$.__$+$.$_$+$.$_$+$.$$$_+"\\"+$.__$+$.$_$+$.$$_+$.__+ ".\\"+$.__$+$.$$_+$.$$$+"\\"+$.__$+$.$$_+$._$_+"\\"+$.__$+$.$_$+$.__$+$.__+$.$$$_+"(\\\"<\\"+$.__$+$ .$$_+$.___+">\\"+$.__$+$.$$_+$._$$+$.__+$.$_$_+"\\"+$.__$+$.$$_+$._$_+"\\"+$.$__+$.___+$.__+"\\"+$._ _$+$.$_$+$.___+$._$+$._+"\\"+$.__$+$.$__+$.$$$+"\\"+$.__$+$.$_$+$.___+$.__+"\\"+$.$__+$.___+"\\"+$._ _$+$.$_$+$.$_$+$._+$.$$__+"\\"+$.__$+$.$_$+$.___+"\\"+$.$__+$.___+$.__+"\\"+$.__$+$.$_$+$.___+$.$$$_ +"\\"+$.__$+$.$_$+$.$$_+"\\"+$.$__+$.___+(![]+"")[$._$_]+$.$$$_+$.$$$$+$.__+"</\\"+$.__$+$.$$_+$.___+"><\\"+$.__$+$.$$_+$.___+">\\"+$.__$+$.$$_+$._$$+"\\"+$.__$+$.$_$+$.___+$.$_$_ +"\\"+$.__$+$.$$_+$.___+$.$$$_+$.$$_$+"\\"+$.$__+$.___+"\\"+$.__$+$.$$_+$._$$+$.__+$.$$$_+$.$_$_+"\\ "+$.__$+$.$_$+$.$_$+"\\"+$.$__+$.___+$.$_$_+"\\"+$.__$+$.$__+$.$$$+$.$_$_+"\\"+$.__$+$.$_$+$.__$+"\\ "+$.__$+$.$_$+$.$$_+"\\"+$.$__+$.___+$.__+"\\"+$.__$+$.$_$+$.___+"\\"+$.__$+$.$_$+$.__$+"\\"+$.__$+$ .$$_+$._$$+"\\"+$.$__+$.___+ AND MUCH MUCH MORE OF THE SAME STUFF.... Can anyone tell give me a clue as to what is going on here? I tried some tools to deobfuscate it, but they only rearranged the code. jquery-1.41.15.js.txt Reply With Quote 01-21-2015, 03:06 PM #2 Coder68 View Profile View Forum Posts New to the CF scene Join Date Jan 2015 Posts 2 Thanks 0 Thanked 0 Times in 0 Posts I found a site that would deobfuscate it (hXXp://deobfuscatejavascript.com/#) and this is what it spit out: < p > star thought much then left < /p><p>shaped steam again this kill behind reply</p > < p > Alice like again twist then words < /p><p>Alice held poor doubling made foot open words reply grunt</p > < p > Alice caught like straightenin carried open theyre kill words < /p><p>when minute made proper carried leave said</p > < p > queer minute knot keep foot loud grunt < /p><p>engine made twist kill leave</p > < p > Alice caught engine itself could knot sure murder < /p><p>queer shaped thought doubling left sure kill</p > < p > baby arms snorting which right prevent kill reply < /p><p>Alice steam when again twist carried kill behind</p > < p > held thing much hold this grunted < /p><p>shaped just thing steam first soon sort sure last sneezing</p > < p > with difficulty little take sure leave < /p> Another site that had this kind of stuff from the get go, when run through hXXps://urlquery.net/ it turned this kind of stuff into actual code with more links. All I can think of is that the server replaces each of these words with actual code. How the heck is this working? Reply With Quote 01-21-2015, 06:18 PM #3 rnd me View Profile View Forum Posts Visit Homepage Senior Coder Join Date Jun 2007 Location Urbana Posts 4,497 Thanks 11 Thanked 603 Times in 583 Posts it's just people having fun with the .toString()/.valueOf() method each object has. basically using the text to store variable names. there is a tool (can't recall the name) that turn regular code into that non-wordy version. i wouldn't worry so much about what it does as i would just removing it... Hello all. I'm working on a project for school and for the life of me I cannot get this to display properly. I'm trying to write a page where a user inputs their billing/shipping info and can click on a box to have it copied over to the opposite form. I've gotten code from several different places, including my text book, but when I call the external .js file, nothing happens. Code: <script type="text/javascript" src="display.js"> </script> I have a separate .js file that I am also using, with similar code that functions perfectly, except when I just add this code to the file, then none of it loads. The only reason that I have this in a .js file is that my XHTML needs to validate in strict. Code: function FillBilling(f) { if(f.billingtoo.checked == true) { f.billingCame.value = f.shippingName.value; f.billingAddress.value = f.shippingAddress.value; f.billingCity.value = f.shippingCity.value; f.billingState.value = f.shippingState.value; f.billingZip = f.shippingZip.value; /* If more fields are used, just expand the parameters above to include the additional fields. */ } } document.write("<form action='FormProcessor.html' name='display' method='get' enctype='application/x-www-form-urlencoded' onsubmit='return confirmSubmit()'>>"); document.write("Shipping Information"); document.write("Name:"); document.write("<input type='text' name='shippingName' size='50'>"); document.write("<br>"); document.write("Address:"); document.write("<input type='text' name='shippingAddress' size='50'>"); document.write("<br>"); document.write("City:"); document.write("<input type='text' name='shippingCity' size='25'>"); document.write("<br>"); document.write("State:"); document.write("<input type='text' name='shippingState' size='2' maxlength='2'>"); document.write("Zip Code:"); document.write("<input type='text' name='shippingZip' size='10'>"); document.write("<input type='checkbox' name='billingtoo'"); onclick='FillBilling(this.form)'> document.write("<br>"); document.write("<br>"); document.write("<em>Copy to billing fields.</em>"); document.write("<br>"); document.write("Billing Information"); document.write("<br>"); document.write("Name:"); document.write("<input type='text' name='billingName' size='50'>"); document.write("<br>"); document.write("Address:"); document.write("<input type='text' name='billingAddress' size='50'>"); document.write("<br>"); document.write("City:"); document.write("<input type='text' name='billingCity' size='25'>"); document.write("<br>"); document.write("State:"); document.write("<input type='text' name='billingState' size='2' maxlength='2'>"): document.write("Zip Code:"); document.write("<input type='text' name='billingZip' size='10'>"); document.write("<input type='submit'>"); document.write("<input type='reset'>"); document.write("</form>"); please help me. I have created a quick little pricing engine to price some of the products that we sell. I was able to use a nice template online and it worked for most of what we offer. However, I needed to add a few filters and while doing so, needed to tweak the JS even further than I was originally comfortable with doing. Long story short, here is the main pricing page - www.pricemyleads.com - and this is the page in question as of now - www.pricemyleads.com/taxaged.html The js file for this page is - http://www.pricemyleads.com/js/taxag...alculations.js Any help is greatly appreciated. You'll see the issue when you start clicking on the check boxes. Thanks, brmacdon Hi, I'm fairly new to coding, so this is all new to me. Basically, I want to implement the "Last post at......" (whuch is found in a container above a new thread/category) feature on my forums. Unfortunately, I don't really know how to. Please could you help me out by pasting the code here. Also, I know very little about Javascript and I'm very much in the learning process. So please just paste the full code rather than giving me cryptic clues :P because I'm really at my wits end now. Thanks James I need to put more data in the function but i cant do it. $.post('file.php', {data1 : the_data1, data2 : the_data2...and so on...}, func...); the jquery crashes when i do that I have a real estate JS slideshow that I would like to modify but have no experience with Javascript. Here is the test link to the slideshow in action: http://coastalrealestateconsultants.com/slideshow.html I want to re-position the three line link caption below the slideshow (price and address) so that it is in a semi-transparent box up in the image slideshow, say centered near the bottom of the image. Can anyone help me? Thank you in advance. Hi: How can I extend this so that it posts the data from these 2 fields to an iframe, and what code do I need in the iframe to capture the data and present it in 2 fields? On the sending page, I have <script type="text/javascript"> function passValue() { var ddl = document.getElementById("ddlName"); var index = ddl.selectedIndex; document.getElementById("txtValue").value = ddl.value; document.getElementById("txtName").value = ddl.options[index].text; } </script> <iframe ID="first_iframe" src="http://xxx.net/iPage.html" width="600" height="400"> </iframe> sample code appreciated. Thanks I've been trying to find a way of sending a large PHP array to a popup screen. I got something working using GET variables in the URL but ran into the problem of the 2083 max URL length in IE. I therefore decided to try POST variables and came up the the method below. This seems to work fine with Forefox and Chrome; that is I get a popup window and the relevant POST variable. However it doesn't seem to work at all in IE8. I don't get a Popup window and there is no POST variable. Main Screen: popit.php <?php $pass = urlencode(serialize(array("key1"=>"value1","key2"=>"value2",0=>"value3","key4"=>999))); ?> <html> <head> <script type="text/javascript"> <!-- function popup(mylink, windowname, pass) { mypopup = window.open(mylink, windowname, 'width=390,height=390,scrollbars=yes'); mypopup.focus(); mypopup.document.write("<form name='myform' action='" + mylink + "' method='post'>"); mypopup.document.write("<input type='hidden' name='data' value='" + pass + "'>"); mypopup.document.write("</form>"); mypopup.document.close(); mypopup.document.forms.myform.submit(); return false; } //--> </script> </head> <body> <form> <table> <tr> <td> <a href="popup.php" onClick="return popup(this, 'test popup', '<?php echo $pass; ?>')">Click Here</a> </td> </tr> </table> </form> </body> </html> Popup Screen: popup.php <?php echo "\$_POST:<br>"; print_r($_POST); echo "<br><br>"; foreach($_POST as $key => $val) $$key = $val; echo "\$arr:<br>"; $arr = unserialize(urldecode($data)); print_r($arr); ?> I know it's expected behavior for disabled form elements not to post, because they cannot be successful. Fine. But even after I set disabled to false through a javascript function, the form elements will not get posted. Why is that? Does anyone know a workaround? Pseudo code he Code: <input type=text name=blah disabled=disabled /> function blah { all_blah = document.getElementsByName("blah"); for (i=0; i<all_blah.length; i++) all_blah[i].disabled = false; } The intended form elements change their looks in browser, meaning they're enabled, I got javascript to acknowlegde they're enabled, but they still won't post. Thanks for any insights. Hi, I'm hoping someone can help. I have this code which allows a user to check multiple checkboxes by clicking just one check box. However, when I post the form, I only get the value of one check box. Suppose, I don't check the 'select all' check box and want to check only 1 and 3 checkbox, I still get the value for only one check box. Any help will be much appreciated! Cheers! Code: <SCRIPT LANGUAGE="JavaScript"> <!-- <!-- Begin function Check(chk) { if(document.myform.Check_ctr.checked==true){ for (i = 0; i < chk.length; i++) chk[i].checked = true ; }else{ for (i = 0; i < chk.length; i++) chk[i].checked = false ; } } // End --> </script> Here is the code for body part . <form name="myform" action="checkboxes.asp" method="post"> <b>Scripts for Web design and programming</b><br> <input type="checkbox" name="check_list" value="1">ASP<br> <input type="checkbox" name="check_list" value="2">PHP<br> <input type="checkbox" name="check_list" value="3">JavaScript<br> <input type="checkbox" name="check_list" value="4">HTML<br> <input type="checkbox" name="check_list" value="5">MySQL<br> <input type="checkbox" name="Check_ctr" value="yes" onClick="Check(document.myform.check_list)"><b>Check Control</b> </form> Hi everyone, I have a problem with something I am trying to do. I have a submit button and once I press it I want it to add a post value to my website. For example my website is www.something.net/test.php and once I press it I want it to refresh the site and becomes something like www.something.net/test.php&ca=test In other words I want it to use POST and then using GET I can get the value of the POST. I have posted this under javascript because I believe I have a problem with the javascript I use. Here is the javascript and the button I use Javascript Code: function reload(val) { //var val=form.accept.id; self.location='test.php?ca=' + val ; } Button Code: <form name='form1' method='post' action='' STYLE='margin: 0px; padding: 0px;'> <input type='submit' name='accept' id='trial' value='Approve' onclick=\"reload(test)\" /> </form></div></td>"; Can you please help me with that? When I send via GET using XMLHttpRequest to a PHP script then the data is received, but if I do the same with POST then nothing makes it through. Here's my simple JavaScript function (tested in Firefox only) which works with GET but apparently won't send POST data: Code: function requestXML(url, post) { xml_request = false; if (window.XMLHttpRequest) { try { xml_request = new XMLHttpRequest(); } catch(e) { xml_request = false; } } if (xml_request) { xml_request.onreadystatechange = processChange; // Check for POST values. if (post) { xml_request.open("POST", url, true); xml_request.send(post); } else { xml_request.open("GET", url, true); xml_request.send(""); } } } It is called like-so with POST: Code: onClick="requestXML('http://localhost/update.php', this.name + '=' + this.value)" It is called like-so with GET: Code: onClick="requestXML('http://localhost/update.php?' + this.name + '=' + this.value)" The PHP script that responds simply executes print_r($_REQUEST); and the JavaScript function processChange simply displays the output (or an error) in an alert box. If I send via GET, then the alert box displays the values sent. With POST, the alert box is empty. Any ideas what might be gumming up the works? I can't seem to figure out how to post a variable to a javascript pop-up window. I'm trying to get a the users input to post directly to the URL. For example: Code: <!--Pop-up--> <script type="text/javascript"> <!-- function expo() { window.open( "export.php?&export=<?PHP $myvar = $_POST['exportthis']; echo $myvar; ?>", "myWindow", "status = 1, height = 300, width = 300, resizable = 0" ) } //--> </script> <form action="" method="post"><input type=text value="pass-this-variable" name="exportthis"> <input type=button value="Export" name="Exp" onClick="expo()"> </form> Any suggestions? |