Javascript trick

I came across this trick for sneding POST data using javascript (no ajax or jquery needed)
http://mentaljetsam.wordpress.com/2008/06/02/using-javascript-to-post-data-between-pages/
in short
it creates a HTML form element,
creates input variables and sets their values
and submits the form.
of course no form appears anywhere on the page (not even hidden in the off screen areas)
is this a good idea
and can anyone think of anythign wrong with this?

Murray *ACP* omitted:
I was going to respond to your post to say that sooner or later you're going to have to get over your shun of javascript dependency, but I couldn't. Know why?.... because I couldn't reply in this forum with javascript disabled.
Murray wrote:
Point being that the majority of websites are totally dependent on the visitor having javascript enabled, which makes your reason a non-issue.
Perhaps you see this on the sites that you browse.  I don't.  It's an issue that needs to be raised - whether or not it fits your demographic and you therefore choose to follow it is up to you.
Take into consideration the part of my previous post I throughly explained which you conveniently omitted before the excerpt you decided to reply to. I'm wondering how were you able to respond to this post, on a website you browse, without the requirement of javascript? Perhaps you see this on websites you browse also... like THIS website. It's rather obvious that javascript will not be enabled for a user that has javascript disabled in their browser and thus goes without saying. However, what's worth mentioning is that it's not uncommon for websites to have absence of alternatives to javascript requirements for use.

Similar Messages

  • How to create editable select box in jsp page

    hi,
    i got som peculiar requirement in my jsp page.i have my page like this.
    <html>
    <body>
    <form name="test">
    <select name="test">
    <option value="one">USA</option>
    <option value="two">India</option>
    <option value="three">UAE</option>
    </select>
    </body>
    </html>
    this is one of the select box in my jsp page.
    now i want to change the look and feel of select box..
    1-dont want to show the scrollbar means the right side arrow which allows to see the total options in select box.
    it should look like normal text box.
    2-roveer apert from the existing values if there is no matching value user must be allowed to enter his own value in above select box..
    how i can solve this problen..
    regards,
    sam

    Is that maybe a browser memory auto-complete thing? It works on Netscape 7.2. But no, it's not a browser auto-complete thing (does NS have that? IE does... either way, I would've disabled that). It's definitely a Javascript trick, I'm sure of that. I know I haven't sent mail to all people in my address book from my work PC, but it doesn't stop them from showing in the list as I type...
    Unless there is a special HTML tag option or browser extension that I've never heard of that allows you to supply a set of values to a text input field for auto-completion (as opposed to the browser remembering what was typed).

  • Centered flash site with no margins

    I was wondering if any one could help me in "coding" my site
    to have my flash page be centered and have NO margins.... I know
    Kirupa.com had a code on his site in regards to some code to be
    placed in the "head" tag of the .html "page" but it has since been
    removed. Could anyone here please help?
    the ultimate goal is to have the site fill up the entire
    screen.
    Thanks in advance

    if you're using a flash 9 player you can use the Stage's
    "displayState" property to go fullscreen. otherwise, none of the
    old javascript tricks work with the ie security fixes.

  • InDesign and Photoshop cause browser to open, multiple tabs appear

    I wasn't sure what to use as a header for this, but I'll try to explain.
    We use InDesign and Photoshop CS4 in my department daily. One of the people using PS and one using ID are having this same thing happen. They'll be using the applications and, all of a sudden, their browser will open and the main "help" page will open for whichever application they're using. Then very quickly, one tab after another will open, all being the main "help" page again. It will keep opening tabs until they go to the Task Manager and stop the process. The tabs open one after another very quickly (I said that already, didn't I?).
    We're using Windows XP Pro, Service Pack 3 (I'm a Mac guy, sorry if my descriptions aren't correct), and CS4 Design Premium.
    Any suggestions?
    Thanks,
    Lloyd

    Well, that's what you get if you whack the F1 key over and over again...  Troubleshooting stuff like this is extremely annoying over in Windows-land, mostly because there are so many places where this bizarro behavior could be introduced. Perhaps these two people have the same keyboard-management software installed? And no one else in the office does?
    It's displaying malware-like behavior, because that was one of the old Javascript tricks in the early days of Windows malware. But for some reason I suspect that it's not actually malware - because only Adobe apps are displaying this behavior, and because you'd want to direct your infectees to banner ads or porn sites or phisherman imitations of Facebook for harvesting passwords or something along those lines, if it was actually malware at work here.

  • Applet blinks  when  launched  in a html page with black background

    Dear sirs:
    I 'm testing a game applet and preparing for deployment. However, whenever i reload the html page containg the applet, the applet will first appear as a white block and then switch to black-background( i set black as bg in first sentence at applet's init() ) .
    It's really annoying as the bgcolor of html is black. I try to set the applet and div's visibility be hidden, but the problems remains. And i try to add a black div covering on the applet( with z-index = 200) , it still blinks.
    Does anyone know how to startup the applet with background other than white?
    I use windows, and jre1.6.0.1 plugin.
    i Searched in google with no result.
    Thanks a lot.

    an initial fade in/out is added after init() function to reduce the flicking.
    some javascript tricks are used to reduce the white flashing after reloading. now it's much better and acceptable.
    However, i still want to know does anyone have some better tricks?
    There's a bug report in 2002 which is shown as "fixed", "closed". i think it's the same problem( in fact not fixed).
    The applet does not start up with the background color set in init() function. It first appears as a white block for 0.2-0.3 second, then switches to the user defined bgcolor . really annoying.

  • Safari and Vista now unable to use my pictures as my background

    I downloaded Safari, and when I wanted to change my background to another picture from my galary it goes black. I can use a solid color for my background, but my pictures are not able to be viewed. I can still see them in my sidebar desktop but to right click and save as background, no longer works. I had dell restore my computer back to before the install and it still didn't fix it. In fact 4 dell technicians couldn't figure it out. There solution was to do a re image....no thanks Anyway I am hoping someone here knows what I'm talking about and can help. Also when I go to view my picutre galary via thumbnails you can't see them just blank pictures.

    You have been most likely stuck to a web page through a simple JavaScript trick. Safari's defaults reopen the same sites you last had up when you close the browser, so the page seemingly never goes away.
    One simple way to get rid of it is to open Safari's preferences. Under the General tab, change the drop down menu for "Safari opens with:" from "All windows from last session" to "A new window". Close the prefs and shut Safari down. When you launch it again, the nuisance page should be gone.
    If you prefer to have this preference on, then instead, go to the security tab and turn off the check box to "Enable JavaScript". All that's happening here is when you click the back button to get off the page, a JavaScript command in the page tells the browser to reload the page, leaving you apparently "locked in". With JavaScript off, it can't stop you from backing out of the page. Then turn JavaScript back on.

  • Need help with href link that submits

    I need some help. I dynamically create HTML that displays a horizontal row of page numbers in Position 8. Although they look like page numbers to the use, are not true Apex pages, but rather "logical" pages that change the content in a single Apex physical page. The URL that gets returned from the HREF sets a variable in the page. Then I need a submit to occur so that all my "after submit" processes run, and the page re-renders. Is this even possible? I've been unsuccessful so far.
    Thanks.

    Martin,
    Two things...
    1. Be careful about "hard coding" values in a link. I don't know if you've already done this, but the link should use substitution variables as so...
    f?p=&app_id.:&app_page_id.:&app_session.::NO::P94000_LOGICAL_PAGE_NUM:2
    When the page renders each substitution variable will be replaced with the correct value.
    2. Not that it really matters, but you named your variable starting with P94000. Typically this would indicate the variable appears on page 94000. Is this the case?
    The problem with what you want to do is that it can be done so many different ways. Each way is not necessarily better than the other. Number 1 above is using a link in the traditional sense. It's a link to the same page (achieved by using app_page_id). It will not submit the page but it contains enough information to set the value of a variable and you can code off of that variable's value.
    You could use a JavaScript trick, but I wouldn't bother for this. In addition, you could use the request value over a variable value to feed off of but since you already started with the variable I'd stick with that.
    The first thing you need to do is figure out if your variables value is being set with the link... Let me know if you have more questions.
    Regards,
    Dan

  • Hide "View Item" ribbon element using jquery or css

    Hi,
    How to hide "View Item" ribbon element using jquery for a single custom list?
    In CEWP, i have tried this:
    .ViewProperties.Manage.ListItem#Ribbon {
    DISPLAY: none
    But this is not hiding the "View Item" option.
    How to achieve this?
    Thank you

    I have tried different CSS and Javascript tricks to hide this item but not successed,
    Now one another solution i found is to used the SPRibbon.TrimById method,
    So for that you need to create one webpart, and add following line of code to it , add this dll first Microsoft.Web.CommandUI.dll
    public void HideRibbonItem()
    SPRibbon ribbon = SPRibbon.GetCurrent(this.Page);
    if (ribbon != null)
    ribbon.TrimById("Ribbon.ListItem.Manage.ViewProperties");
    Now call this function to the page load event of webpart,
    Now add this webpart to that page instead of content editor webpart,
    so it will hide the View Item form the custom list ribbon
    Hiren Patel | Please click "Propose As Answer" if this post solves your problem or "Vote As Helpful" if this post has been useful to you.

  • SPYWARE on my Mac

    I just moved and hooked up service with Comcast. While I was hooking up I didn't bother (stupid!) hooking up my Router/Firewall (Linksys). and after I hooked up Safari / IE all tok me to what the Comcast Tech said was some sort of Spy page. Can't remember what it said, but they said if its in your address bar, that means some sort of spyware is on my computer. I rehooked up my Router/Firewall, do I have anything to fear now that is hooked up, or is the damage done? Is there any GOOD anti-spyware software for the Mac (yet!)?
    Spybot, I heard was free, but I only get the pay pages. Is it worth it?
    Thanks.

    There are websites that use a javascript trick with your browser. This fools you into thinking they've gain information from your Computer by means of 'Spyware'. They do this in order to sell you anti spyware software.
    As far as I know there is no spyware around that affects the mac other than keystroke recorders that have been installed by someone physically sitting at your desk.
    The best from of a cure is prevention. So why not protect your Mac with an application aware Firewall such as little snitch. This app would alert you as to any unauthorised application try to dial out of your mac.

  • My safari hacked...I fixed it..

    Last night, 3/26/15, my safari screen was taken over by someone posing from Mac... it said to call a number and keep repeating a message that my computer has been compromised.. I force quit and restarted but message kept coming up but with different # to call... I search for answers on my iPhone then opened chrome which worked for answers ..   Someone said to open safari again... then turn off wifi... then reopen safari...I couldn't remember what the person said to do after that.. but I was able to get into my history in safari and clear my history for the past 2 days... walla!  I cleared the message and ran a utility dr and restart computer.. so far so good... no messages from those hackers.. ..hope this was a permanent fix...
    Is there a real adware from Mac for our macbrook pro?   I don't believe anyone any more... I do look for "hpps"  I look for the "s" for security at the end... the pop up screen did not have the "s"..
    Good luck everyone...

    You weren't hacked. It's a JavaScript trick to keep your browser locked to that page. What you did was all that needs to be done. There are hundreds of similar posts on these forums.
    Yes, there is real adware. To date, it has been harmless, just extremely annoying. AV software (if you have it, and you really don't need it) will not recognize adware as something to detect or remove since it isn't an actual threat. If you do get any adware installed, you can either follow Apple's manual instructions for removing it, or use the free automated tool, AdwareMedic. Though AdwareMedic requires Lion or later. Manual removal is your only real option in Snow Leopard or older.

  • Center Flash After IE patch in Flash 8

    quote:
    Originally posted by:
    kglad
    if you're using a flash 9 player you can use the Stage's
    "displayState" property to go fullscreen. otherwise, none of the
    old javascript tricks work with the ie security fixes.
    I installed the patch for IE, tried to center, came on the
    forum, SEARCHED (yes, I do that before I post), found the above
    post and now stuck.
    Ok... has anyone figured this out yet. Tried publish
    settings, <div...>, <center>. and even putting it in a
    table.
    Anyone got a fix?
    Thanks

    I think I got it. Put this code on the html page after the
    body tag:
    <div style="width:100%; text-align: center">
    And close it right before the </body>
    </div>

  • JavaScript validation/override red borders?

    We are creating numerous forms in LiveCycle and are very averse to having to specify "User Entered - Required" for two main reasons:
    doing so places those ugly, red boarders around required fields
    most fields on most forms are required, we don't want to clutter our forms with red borders
    The problem we encounter is that users can submit empty forms/null values via email, and I yet to find a way around this. Incomplete forms/data, particularly on things like requisitions and the like, can lead to delays in processing. We want to mitigate that by forcing client-side validation before users submit their forms via email.
    I am very new to both LiveCycle and JavaScript.
    I have tried
    fieldname.mandatory = "This cannot be left blank.";
    tied to the validate event, but this does not seem to do anything: users can still submit forms, even if the value is null/empty.
    Where this would most be used is with text and numeric fields and, occasionally, with radio buttons/exclusion groups.
    Can someone please help me figure out simple client-side JavaScript validation (or other method) that would force users to enter values in these mandatory fields before submitting, preferably without having to subject our users to the hideous borders?

    Thank you; a blog post I found contained the answer I was looking for. Essentially:
    Now you see me, now you don’t.
    Interactive forms highlight where you should enter data. To turn this highlighting on, click the Highlight Existing Fields button.
    The fillable fields within the form (see example below) are highlighted in a light blue color. This lets you enter information into these fields. By default, Adobe® Reader® displays a red border around required fields. Pretty dang ugly, huh?
    Fortunately, it can be turned off.  This script (placed on a form:ready event) will do the trick:
        if (xfa.host.name == "Acrobat")
    app.runtimeHighlight = false;
    Here’s how we achieve this:
    Part 1:
    In the Object palette, click the Value tab. Under Type, choose User Entered – Required.
    First, we need to define which fields are mandantory/required. Click within the desired field to select it.
    You can assign as many mandatory fields as the form requires. When you are finished doing this, enter the Script Editor.
              Note:   To show or hide the Script Editor window as you need it, click the toggle.
    Select the form:ready event. Be sure JavaScript is the chosen scripting language to run on the Client.
    Type the following script into the window:
        if (xfa.host.name == "Acrobat")       app.runtimeHighlight = false;
    Save your work.
    Part 2:
    From the File menu, choose Form Properties.
    Click the Form Validation tab.
                   Click Color Failed Fields.               Check the box next to Color fields and fail their validations.
    To turn borders off, click the arrow next to Border Color, then click the box.
    To define a background color, click the arrow next to Background Color, the choose More Colors.
    Select the first available empty box, then click Define Custom Colors.
    Define a custom color per your visual identity guidelines.
    When you are finished, click on Add to Custom Colors, then click OK.
    Click OK on the Form Properties window.
    Save your work.
    The result? When the user tries to submit a form without first entering data into the required fields, an alert message is displayed.
    When the user clicks OK to clear the error message, form submission is cancelled.
    Failed fields are highlighted in an attractive way—without red borders.

  • My sites have been hacked and hostgator has told me to "Disable javascript - Use the firefox addon noscript" and I don't know how to. Are all updates always sent to me as that was another point made to prevent hackers? Thanks you. David. in English

    What are malicious scripts and what causes them? Over the years hackers found it hard to trick people into visiting suspicious sites so they're now targeting legit sites and using them to infect unknowing customers. In most cases an FTP account's password is obtained through key logging malware, then legit website files are modified to distribute the malware and gather more passwords. If your PC has been infected with one of these trojans, your bank account, email accounts, and FTP accounts may no longer be secure. * What to do if you find malicious scripts 1. Use the following online vulnerability scanner and ensure your software is up-to-date: http://secunia.com/vulnerability_scanning/online/?task=load 2. Download antivirus and fully scan your PC for malicious files. Here are some free online scanners: http://housecall.trendmicro.com/ http://www.bitdefender.com/scan8/ie.html http://www.kaspersky.com/virusscanner http://support.f-secure.com/enu/home/ols.shtml 3. Update all passwords that may have been obtained. Do not use old passwords, generate new ones. 4. Upload older versions of the files or contact support for assistance removing the malicious scripts. * Prevention - Ensure you use the latest browser version - Disable javascript - Use the firefox addon noscript - Download and install some free antivirus software, make sure it stays updated - Use http://www.avg.com.au/index.cfm?section=avg&action=onlinescan to test suspicious links you are given in emails or find online. If you are seeing a Google Attack Page when you visit the site, use the steps below to request that Google reindex the site and hopefully remove this block. This excerpt was copied from the URL below, and provides step by step instructions to request a delisting. http://www.google.com/support/webmasters/bin/answer.py?answer=45432 Once you have reviewed your site and are sure it is clean, you can can submit a request for review. Note that you'll need to verify site ownership before you can request a site review. 1. Sign in to Webmaster Tools with your Google account. 2. On the Dashboard, select the site you want. 3. On the Overview page, click Request a review and follow the instructions. Best regards, Tyler Evans Network Security Administrator HostGator.com LLC http://support.hostgator.com

    Thank you.
    I also had tried other means of getting answers and got an even more specific answer on just how to do this.  Below is the link to the actual knowledgebase article giving specific instructions since there are some files that need to be on the Palm and some on the card, etc.
    http://support.laridian.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=380&ratingconfirm=...
    I emailed Zondervan to see if they might be able to direct me to a downloadable manual.  The referred me to laridan.com who now supports their software.
    I followed the instructions, taking into account some things that were already where they needed to be, hot synced it and it seems to be working fine with 7.8 M free space on my Palm which I trust is enough for my other very large applications.
    Thanks for your help!
    Post relates to: Tungsten E2

  • Passing value from Report Column to Javascript

    Dear Apex wizards,
    I am a bit stuck right now with implementing a modal pop-up/iframe/javascript and this forum is my last hope to fix this issue.
    Anyway, will try to explain what I am trying to accomplish.
    What I need is: I want to have an SQL report, as a very first column I want to have an "ID" numbers from my table and I want this column to have a "Column Link" set in "Column Attributes" proper ties. The trick is, that when I click on the column link (when I run my report on Apex page) I need a JQuery modal window to pop-up where in IFrame will be another page and this page will use an "ID" from my column link URL to display data. So, basically I want to pass an "ID" value from my parent page to my child page which is displayed in iFrame of modal window.
    And here is what I have:
    1. I do have an SQL report:
    select SUBNET_ID,
           long2ip(NETWORK_ADDRESS),
           long2ip(SUBNET_MASK),
           long2ip(END_HOST),
           long2ip(START_HOST),
           MAX_HOSTS,
           long2ip(BROADCAST_IP),
           NETWORK_CLASS,
           NETWORK_SIZE,
           HOST_SIZE
    from   YC_CM_IP_SUBNETS 2. Then, in "Column Attributes" for "SUBNET_ID" a have set a "Column Link" to URL as : javascript:ViewNetworkDetails(#SUBNET_ID#); 3. Now, when I run my page and point my mice on any item in my "SUBNET_ID" column I can see that it is getting a "SUBNET_ID" number from my table and it shows it in the buttom of the browser as :javascript:ViewNetworkDetails(1);, or (2) or whatever "SUBNET_ID" is. So, that is good.
    4. And here I am getting confused, basically I have to pass a value of javascript:ViewNetworkDetails(#SUBNET_ID#);, which seems to work as it gives me correct numbers from my table, to my "ViewNetworkDetails" JavaScript function, so it can paste this value into "f?p=........." iFrame URL. Below is my Jquery Modal form script and Javascript to redirect me to my popup page (the script is in HTML Header):
    <script type="text/javascript">
    function ViewNetworkDetails(){
    var apexSession = $v('pInstance');
    var apexAppId = $v('pFlowId');
    var subnetIDNumber = document.getElementById(#SUBNET_ID#);
    $(function(){
    vRuleBox = '<div id="ViewNetworkDetailsBox" title="View Subnet Details">
    <iframe src="f?p='+apexAppId+':103:'+apexSession+'::NO:103:P103_SUBNET_ID:'+subnetIDNumber+'
    "width="875" height="500" title="View Subnet Details" frameborder="no"></iframe></div>'
    $(document.body).append(vRuleBox);
    $("#ViewNetworkDetailsBox").dialog({
                            buttons:{"Cancel":function(){$(this).dialog("close");}},
                            stack: true,
    modal: true,                            
                            width: 950,                    
    resizable: true,
    autoResize: true,
    draggable: true,
    close : function(){$("#ViewNetworkDetailsBox").remove();
                            location.reload(true); }
    </script> P.S. My assumption is, that there is a problem with this part of my scriptvar subnetIDNumber = document.getElementById(#SUBNET_ID#); where I cannot get my "SUBNET_ID" value from javascript:ViewNetworkDetails(#SUBNET_ID#); into "subnetIDNumber" variable and that is why I cannot pass it to my iFrame URL.
    P.S. P.S. the child page 103 has a "Automated Row Fetch", so it is not a problem. In addition, I did a simple test, where I had a page item "P102_Value" with some value and in my script I had instead var subnetIDNumber = document.getElementById(#SUBNET_ID#); this var subnetIDNumber = $v('P102_Value'); and it worked perfectly fine....but cannot make it working against SQL Select statement :-(
    HEEEEEEEEEEEEEELLLLLPPPP.
    Thanks

    Change your column link to send the subnet_id column's value to the function call (you mentioned it, but I m not sure if you actually did)
    javascript:ViewNetworkDetails(#SUBNET_ID#);<u>You are passing the parameter value to the function, but not defined any parameters in the function definition</u>(this is possible in JS, any extra parameters is ignored)
    So, modify the function to accept the subnet ID parameter(I am actually surprised how you missed this) and assign that parameter to variable.
    <script type="text/javascript">
    function ViewNetworkDetails(pSubnetId){
    var apexSession = $v('pInstance');
    var apexAppId = $v('pFlowId');
    var subnetIDNumber = pSubnetId;
    //rest of the code would be the same

  • Can you tile windows from Javascript in CS3?

    I have a javascript that will open 2 images in Photoshop from different directories based on a single filename, so that the users can view them side by side. They need this to be able to compare the colour correction from an automated process against the original image.
    The trouble is that even though I can open the images, I cannot invoke the "window/arrange/tile vertically" menu item, as I can with InDesign.
    Does anyone know of a neat trick to get around the missing tile vertically command within Javascript for Photoshop CS3.
    (I've trawled the web and found that most answers are for 4 or more windows, where the images are pasted into one doc. But here I need to keep the windows separate.)

    One way to do this in CS3 is with an action. Make a new action then stop recording. There should be no steps in the action. From the action panel's flyout menu choose insert menu item. Then choose the "window/arrange/tile vertically" menu item. You now have an action that you can call from a scipt to tile the two images.
    Another way is to use Xbytor's doMenuItem function
    // adatped from Xbytor's xtools stdlib.jx
    doMenuItem = function(item, interactive) {
       var ref = new ActionReference();
       ref.putEnumerated(charIDToTypeID("Mn  "), charIDToTypeID("MnIt"), item);
       var desc = new ActionDescriptor();
       desc.putReference(charIDToTypeID("null"), ref);
       try {
         var mode = (interactive != true ? DialogModes.NO : DialogModes.ALL);
         executeAction(stringIDToTypeID("select"), desc, mode);
       } catch (e) {
         if (!e.message.match("User cancelled")) {
           throw e;
         } else {
           return false;
       return true;
    doMenuItem(stringIDToTypeID('tileVertically'));
    Note newer version of Photoshop have a app method named runMenuItem that can be used instead of a custom function.

Maybe you are looking for