Trying to fetch a row ID from the address bar

Hello,
I am creating a website that will strickly be run on a touch
screen and saved locally. I am using spry.
I have a Category page with a list of 4 products (Each a
large link button). All of them link to the same html document like
so:
href="product.html?thisID=0" and then the next one "thisID=1"
and so forth.
On the product.html page I wrote a little javascript function
to read the address bar and get me the id number. Here is the
javascript function that runs on page load:
function fetchID() {
var varArray = document.location.href.split("?");
var thisID = varArray[1].split("=");
dsProducts.setCurrentRowNumber(thisID[1]);
alert(thisID[1] + " | " + dsProducts.getCurrentRowNumber());
When I click the first product with thisID=0 the alert says
"0 | 0"
And spry gives me an error saying "Invalid Row Number: 0"
When I click on the second product (thisID=1) the alert
correctly says "1 | 0" and once again I get an invalid row number:
1
How can I set the current row using the variable in the
address bar? My javascript correctly gets me the integer that I
pass.
Thanks,
Braxo

Hi Braxo,
To do what you want is no need to parse the whole url to get
the id number.
You can add an observer for your dataset. When the dataset
will be populated with the values from xml, you can set the current
id to the url parameter.
You have to this because when page loads and your code runs
no data is present . This is because data loads asynchronous.
You should add something like this into your code:
dsProducts.addObserver({ onPostLoad: function(ds, type) {
dsProducts.setCurrentRow(params.thisID); }
Until the end of this week, on labs will be posted an
complete example that covers your situation and you can follow the
example from there.
Hope this helps,
Diana

Similar Messages

  • After resetting firefox, I can no longer search from the address bar

    Like the title says I can't search from the address bar "awesome bar" anymore. I just get a 404 error when I try. Searching just lists tons of people getting the "just update keyword.url" answer that's no longer valid. And hasn't been for several years.
    I got a browser hijack somewhere. Not sure where, and nothing was installed on my computer so I reset firefox and lost all my search engines. IE was fixed with an uninstall/reinstall. Chrome hates my face and no longer runs. (And google's help is... well if I wanted to be insulted...) I've reinstalled several times. No dice. I've now reset firefox three times. It's just not working. I've ran several virus scanners, ran several malware programs, and even asked my IT department. (They don't care cause IE works and their stupid "virus scan" was clean. I mean it took 30 seconds. What the hell did it actually scan?)
    Surely there's a keyword or something that I'm missing that needs to be reset so I can get my address bar searching again.

    Current Firefox versions use the default search engine that is set in the search bar as well for searching via the location bar and on the about:home page.
    You can use the SearchReset extension to reset some preferences to the default values.
    *https://addons.mozilla.org/firefox/addon/searchreset/
    Note that the SearchReset extension only runs once and then uninstalls automatically, so it won't show on the "Firefox > Add-ons" page (about:addons).
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extension (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
    *Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
    *Do NOT click the Reset button on the Safe Mode start window
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extension+and+themes
    You can check the connection settings.
    *Tools > Options > Advanced > Network : Connection > Settings
    *https://support.mozilla.org/kb/Options+window+-+Advanced+panel
    If you do not need to use a proxy to connect to internet then try to select "No Proxy" if "Use the system proxy settings" or one of the others do not work properly.
    See "Firefox connection settings":
    *https://support.mozilla.org/kb/Firefox+cannot+load+websites+but+other+programs+can

  • Can not copy a URL from the address bar/line

    Why is it proving so difficult for me to copy a URL from the address bar using Safari?  When I click on the link I want to copy, it does not highlight.  I have used Command L and Command C, and that works but there has to be a simpler way.  I also read that if I click the address bar once, then press the control key and click on it again that a menu would appear with cut, paste, copy.  That does happen, but all options are greyed out, and not selectable.  Another google search resulted in someone saying there was a button or arrow to click on and that this tool would copy the URL.
    The URL I am copying is very long, longer that the address bar window
    What Gives Here?

    Click the icon (favicon) to the left of the URL.
    That will select the entire URL.
    Command C will copy the URL.

  • I just installed Firefox 5. How can I remove the Bing search from the address bar? I don't want to see Bing at all.

    I just installed Firefox 5. How can I remove the Bing search from the address bar. I don't want to see Bing at all. I tired the Firefox options, right-clicking on the search field and the toolbar selection drop-down but could not find a way to get rid of that unwanted search window.

    *'''at the bottom of firefox''' there is a weird looking greenish circle with a lightning bolt in it*
    1. click it and hover over to '''PREFERENCES'''.
    2. click the second circle that say's '''BING.'''
    3. '''Un-check''' both boxes.
    4. you're done :)
    Note: it's not going to show the google symbol encrypt when you open a new tab it's just going to automatically use google as a search engine.

  • How can I remove the Star Button from the Address Bar?

    How can I remove the Star Button from the Address Bar? There's no obvious way of doing it. Is there any about:config value related to it?

    https://addons.mozilla.org/en-US/firefox/addon/no-star-button/

  • How do I turn off searching from the address bar. Setting keyword.enabled to false is not working.

    I never want to search from the address bar. I've been able to turn off this horrible annoying feature in the past by setting "keyword.enabled" to false but this no longer seems to work. Is there any way to fix this so that searching from the address bar never happens with any search engine?

    If you set keyword.enabled to false, then what Firefox normally does is check whether your address bar entry is a valid server name (first DNS lookup) and, if not, it will try fixup (e.g., www.+''what you typed''+.com) (second DNS lookup).
    If you get search results, particularly if you get results from some site other than your preferred search engine, there are two possible explanations:
    (1) DNS provider hijack.
    There are some service providers that do not answer the DNS lookups honestly and instead will divert you to their own page of search results. In that situation, there sometimes is a link on the page to opt out, either right there, or behind an explanation (why do I get this page?) or a settings link. You may have to look around. Or if your service provider won't let you opt out, you might need to switch to using OpenDNS or Google Public DNS.
    You probably should also check your connection setting it case that has been modified:
    "3-bar" menu button (or Tools menu) > Options > Advanced > Network mini-tab > "Settings" button
    Try "No proxy" here to see whether that helps.
    (2) Bad add-on.
    Some extensions will divert honest DNS misses to their preferred search site. Here's what I suggest for cleaning out bad add-ons:
    (A) Open the Windows '''Control Panel''', Add/Remove Programs. After the list loads, click the "Installed on" column heading to group the infections, I mean, additions, by date. This can help in smoking out undisclosed bundle items that snuck in with some software you agreed to install. Take out as much trash as possible here.
    (B) Then, in Firefox, open the '''Add-ons page''' using either:
    * Ctrl+Shift+a
    * "3-bar" menu button (or Tools menu) > Add-ons
    In the left column, click Plugins. Set nonessential and unrecognized plugins to "Never Activate".
    In the left column, click Extensions. Then, if in doubt, disable (or Remove, if possible) unrecognized and unwanted extensions.
    Often a link will appear above at least one disabled extension to restart Firefox. You can complete your work on the tab and click one of the links as the last step.
    (C) Search for remaining issues with the '''scanning/cleaning tools''' listed in our support article: [[Troubleshoot Firefox issues caused by malware]]. Note that the tools are free and take considerable time to run. If they seem to finish quickly and then ask for payment, you might have a Fake AV infection. Please use the specialized forums listed in the article in that case.
    Success?

  • What is this blank dialog box that extends from the address bar?

    I just downloaded the Aol version of Firefox and this blank dialog box drops down from the address bar. I am then unable to do anything with the page.
    What do I do to get rid of this thing?

    Disable the AOL add-on until AOL fixes it.

  • Cursor Jumps Away from the Address Bar

    When I start Firefox, the cursor jumps from the address bar to the search box; usuallly, this happens right after I type in WWW. I fix this by to the address bar; sometimes, it jumps back to the search box and I have to finally take my hands off the keyboard and use the mouse to click on the address bar. This is a frustrating time waster.
    == This happened ==
    Every time Firefox opened

    Press the escape key to stop loading the page if you do not want to use that home page, but want to open another page via the location bar.
    Many websites use an onload event to set focus to a specific search field or input field.

  • Dragging from the address bar to desktop... Why open a new window?

    Running 64bit Windows 7 Pro with SP1 installed. Also running Internet Explorer 11.
    When I drag the icon from the address bar of IE to my desktop to create a shortcut to that webpage, the current tab will close and a new browser window opens and loads the page. Why does this happen, and more importantly, how can I stop it?

    Hi yes... it did work before Tear-able tabs were introduced...
    I opened a connect ticket at the MS Feedback channel for IE.
    https://connect.microsoft.com/IE/feedback/details/930834/dragging-from-the-address-bar-to-desktop-why-open-a-new-window-tearable-tabs-breaks-drag-drop-to-desktop-from-addressbar
    I don't think it will be a show stopper...
    another workaround is to store all of your links in your Favorites folder (or Favorites Bar folder)...
    then the Address bar autocomplete makes it easy to retrieve the web address and navigate back to the website....
    If you are using the desktop to store your downloads (zips/whatever), there is no need for this as the IE Download Manager will retain a listing of downloaded files (until you clear it)... you can also choose to save your downloads to the Desktop folder
    I/o the default Downloads folder.
    Rob^_^

  • My bookmarks used to appear in dropdown menu from the address bar on my iMac G5. I switched to Mac Notebook & from Leopard to Lion. Now my bookmarks are not accessible from the address bar anymore (the line where you type in the website address)

    '''My bookmarks used to appear in dropdown menu from the address bar on my iMac G5. I switched to Mac Notebook & from Leopard to Lion. Now my bookmarks are not accessible from the address bar anymore (the line where you type in the website address)'''

    There appears to be a problem with Firefox 20 with UNC paths when using roaming profiles on a server.
    *[[/questions/955140]] why is the 20.0 address bar unresponsive?
    This is currently investigated and tracked via this bug report.
    *[https://bugzilla.mozilla.org/show_bug.cgi?id=857672 bug 857672] - Address Bar not working (roaming profiles;UNC path support OS.File)
    <i>(please do not comment in bug reports: [https://bugzilla.mozilla.org/page.cgi?id=etiquette.html])</i>

  • Firefox doesn't let me copy the web address from the address bar using the context menu with second button in mouse or trackpad

    Hello!
    I write to report a problem I have with the new update v35 and v35.0.1 Firefox on address bar
    With the new version 35 of Firefox on Mac OSX Yosemite, clicking directly with the right mouse button in the address bar to copy the web address, context menu NOT allowed to copy the link, it shaded in gray, inactive ... you have to click on another browser free zone before returning to click a second time and be able to copy the link from the context menu
    I mean, with the first right click in the address bar context menu that appears don't allow me to copy the link directly, you have to click on another area and then clicking again with the right mouse button in the address bar to copy the web address (happens to all pages)
    I tried to open Firefox with inactive complements and plugins, and reset Firefox to first time use (like the first install) and the problem is here again... With or without complements and plugins the problem is here
    This happens before and then when I format my computer
    Here I put a screenshot that explains the problem better than my words
    http://i.imgur.com/QxKd8P1.gif
    I hope you can help me

    ''guigs2 [[#answer-685712|said]]''
    <blockquote>
    The icons that show up when you right click in that image do not look like the default version of Firefox, even with the Spanish Dictionary/Language pack.</blockquote>
    Hello
    The icons in the screenshot is from Linux OS, because I don't know how to capture screen, and somebody in Linux OS made it to show the problem that I was talking about
    I don't have any icon addons only have 2 plugins, quicktime (integrated in OS) and adobe Flash, updated both
    Before I format my Mac, I upgraded Firefox to v35 and here came this error
    Then I format my Mac after days, by subjects of hard disk space, etc... when I install Firefox 35 (new install) the problem was here again
    I tried to Open Firefox with disabled Add-ons, and Reset Firefox to an install version, but the problem is here always

  • I want to Remove RSS icon from the address bar when I click on My SMF Forum

    I have a SMF forum when I click on the login page I see an RSS icon in the right of the address bar next to a star.
    The forum opens in an RSS to subscribe, which is stupid as it is not an RSS feed, it is a forum. I want to get rid of this and do not know how to do it.

    This is a feature of firefox, although it may have been removed from firefox 4beta ( at least in default set up, no idea why). The appearance of the RSS icon within the location bar is intended to inform that RSS feeds are available from the site in use. You may note that this firefox forum we are using has such an icon displaying in the location bar, that is because feeds are available allowing you to track the threads, no doubt something similar happens with the SMF forum you mention.
    If it is possible to remove the RSS icon from the location bar it will certainly not be straightforward, other than by upgrading to 4beta, and that is available now, and may be run whilst the stable version firefox 3.6 is still installed on your computer. (iirc there is an add-on available to add the rss icon to Fx4)
    If a post answers your enquiry, you may wish to use the button alongside it to mark it as solved.
    * for more about Firefox 4Beta and its download [http://www.mozilla.com/en-US/firefox/4.0b10/releasenotes/ click this]

  • How can I get Firefox to include the http when copying and pasting from the address bar?

    I know you can use "browser.urlbar.trimURLs" in about:config to re-enable the display of "http://" on URLs in the address bar, but I think there's an actual bug with hiding them in the address bar that should be corrected:
    When I click and drag in the address bar to select part of an address, including the beginning of the address, then use CTRL+C to copy it, and CTRL+V to paste it into something else, the pasted URL does not include "http://"; this is often inconvenient and will break in certain forms and so on.
    In Chrome--where I guess the http-hiding feature was copied from--if you click and drag to select part of the URL including the beginning, then copy, when you paste, the "http://," hidden in their address bar, *is* included. That's how it *should* work. Firefox's implementation is incomplete and frustrating.

    This is a known problem and should be fixed in Firefox 8.<br>
    See https://bugzilla.mozilla.org/show_bug.cgi?id=668019<br>

  • How can I copy text as-is from the address bar?

    Hi there,
    I use numerous username/password combinations to log onto an ftp site in the following form:
    ftp://fairlyShortUsername:[email protected]
    E.g. ftp://moduleFour:[email protected]
    Using this method allows me to log straight in because username and password are stored right inside the url.
    Due to their convenience, it is useful to be able to pass these links around to others.
    If I start typing the username (e.g. 'moduleF'...) in the address bar, the complete URL appears in the autocomplete suggestions and I can use the down arrow to display it in the address bar and copy it to the clipboard.
    However, when I paste what I copied (taking the above example), I just get ftp://ftp.site.com. This is no use to anyone without the information that has been stripped out.
    I'm not concerned with security (understandably, given that I'm using urls with plain text passwords).
    I'm sure firefox is just trying to be 'helpful', but is there any way I can copy the exact text displayed at the time I press Ctrl + C, without firefox interfering? At the moment, I have to look up the username and password and paste them into a url template every time, which given the number of times I've done it, has already taken up more time of my life than it's taken me to write this question, which is why I'm asking.
    *** NOTE: Changing the value of browser.urlbar.trimURLs and browser.urlbar.formatting.enabled has *not* allowed me to fix this. ***

    Okay, I think one of these add-ons is just what you need.
    Go to the '''[https://addons.mozilla.org/en-US/firefox/ Mozilla Add-ons Web Page]''' {web link}
    (There’s a lot of good stuff here) and search for what you want.
    '''[https://addons.mozilla.org/en-US/firefox/addon/my-copyfixer My CopyFixer ]''' {web link}
    Use Ctrl+C when nothing selected to copy page title and url in
    various format (template base).
    '''[https://addons.mozilla.org/en-US/firefox/addon/send-tab-urls/ Send Tab URLs]''' {web link}
    Send a list of browser tab URLs to email, Web mail, or the clipboard

  • The google feeling lucky app from the address bar is not working, a program called vshare performs a search instead and I am unable to restore the original function. please help

    I do not know how but vshare, has been performing a search everytime I type something in the address bar that is not a complete website i.e. facebook instead of facebook.com
    this is very annoying and I am unable to uninstall vshare, I have even tried uninstalling firefox and reinstalling it

    I had this problem too, and just fixed it, and found a great website that helped.
    1. In Firefox type about:config in the address bar and press ENTER.
    2. Locate and double-click the entry for keyword.URL
    3. Set the value based on which search provider you would like to use for your address bar searches. Here are a few search strings you can use.
    Yahoo: http://search.yahoo.com/search?p=
    Ask: http://www.ask.com/web?q=
    Google: http://www.google.com/search?&q=
    ChaCha: http://search.chacha.com/search/query?searchwithguide=0&query=
    source: http://www.technipages.com/firefox-change-address-bar-search-provider.html
    And if you want the I'm Feeling Lucky search, instead of just the Google page search, then put:
    http://www.google.com/search?ie=UTF-8&oe=UTF-8&sourceid=navclient&gfns=1&q=
    instead of: http://www.google.com/search?&q=
    I just did that, and it worked for me. I had to go through a bunch of the different options, but I found one that worked.
    Source: http://www.google.com/support/forum/p/Chrome/thread?tid=25cf5ea2bc5a2744&hl=en

Maybe you are looking for

  • Errors found when using tar and ACL's

    Having difficulties with TAR and ACLs, and wondering if anyone had seen this before. Here's the scenario: create a few directories and a few files. Tar it up and extract the files. Now assign some ACL's to them (some default for directories), tar it

  • RDP to VDI 3 fails with 'Administrative Task closed the connection'

    The RDP to the VDI 3 login page described in the page below would be a really useful feature for us. Unfortunately when I connect using MSTSC (Windows XP SP 3) the screen goes black, then a message pops up with 'The connection was closed by an admini

  • I need a copy of firefox on a disc for a computer with a totally crashed version of IE.

    Can I get the file mailed on a disc? I can't access IE at all on the computer and have no other browsers installed. The computer runs MSN messenger, so I know it's not the connection...it's internet explorer. Address is: Carson Chiropractic, Inc., 15

  • Tool Tip Text and JcomboBox/JList

    Is it possible to attach and display a different Tool Tip message for each item in a combobox or jlist.

  • Create an iView for Xcelcius SP3 dashboard

    I have created an iView for my Xcelcius SP dashboard and I keep getting an error when I click display.  I used the instructions in the wiki page http://wiki.sdn.sap.com/wiki/display/BOBJ/IntegrationofanXcelsiusdashboardinNetWeaverEnterprisePortal The