Two problems with a recently viewed items script. One is an undefined that's getting written with each iteration. How do I get rid of the string of 'undefined'?
The other is that the items write out in the reverse of the order I want them in. I suppose I could just make the containing <div> tags float: right; instead of float: left; and fix this, but it would look odd when only 1 or 2 items have been viewed. I'd like item 1 to display to the far left, then shift to the right as additional items are viewed. Recently viewed items show horizontally at the bottom of the page content, above the footer.
The JS for the recent items is:
Code:
The script embeded in each page to pass values to the above looks like:
I'm working with this code which sets an object to visible when clicked. Trouble is the previous object hasn't been set to hidden so they overlap each other.
How can I get this function to hide the previous object before showing the next ?
Code:
function MM_showHideLayers() { //v6.0 var i,p,v,obj,args=MM_showHideLayers.arguments; for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2]; if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='show')?'hidden':v; } obj.visibility=v; }
I'm getting strange error "Object doesn't support this property or method" while accessing the application recently. The same code I am using since long time. The below code is written in java class:
We require the ability to be able to inject code into all pages that people view. There are a number of requirements. I am hoping there might be a catch all that will allow us to do what we need.
Firstly once people load up IE. I would like a banner to be displayed at the top of ie reminding people of internet use guidelines. I would like this to be visable at all times on all pages.
The second part is that I would like to inject code into all pages that have shockwave. The injection of code would either hide or show flash but in a PAUSED static state (ie no motion)
Not being a firefox guru, I understand that this is the kind of thing people are doing with Monkeyscripts. However as a corp I cannot get away from using IE because of the services we use.
I have a printing problem that I'm hoping someone can solve.
I have a small company website that uses javacript under IE5.5. For web pages that display large lists I used a div to build a simulated iframe.
When a user pulls the right slide to move down the table and decides to print the screen, the printed output shows the information from the beginning of the table and stop after 13 lines. This often differs from the "view area" on the client desktop.
Any suggestions how to get the "view area" to the printer?
I am taking the document.documentElement.innerHTML from the current page displayed to the user and converting it to pdf using Java.I send document.documentElement.innerHTML from the client and interpret and process it at the server.My question is : there are several elements that I would like to remove in the html before I can send it over to the server.Eg. I do not need some text boxes etc as the pdf will be a snapshot of the viewing page hence no need for input boxes. When I try :
var comments = document.getElementById('toggleDisplayComments'); var parentElement = comments.parentNode; parentElement.removeChild(comments);
The element gets removed in the page that is viewed and not in the html that I am sending
I'm building a slide show using jQuery and I am having sporadic issues displaying an image before it's fully loaded. e.g. Images are stored in a database (binary not the image path) and I use an image handler to retrieve the images. Because the amount of images for each slide show is not predetermined, I load the first image and next image initially, then each time a slide (next) is selected I fetch that slide and the next slide. I don't want to pre-load each image as there could be well over 50-60 images and some users might only view a handful of slides. Thus wasting bandwidth and resources. Is there a way I can tell when the requested image is ready to be viewed/rendered? The reason for this is that all images are not fixed width/height and to place them in the middle of the "stage" I need to check the height/width so I can add it to the container I am positioning.
I've got a problem with a jQuery slider I'm using on a website I'm currently developing (temporarily hosted at [URL]. Generally it looks and functions as I'd like it to, but it seems to have a problem when you're looking at other tabs/websites in your web browser. When you come back to the slider having been looking at something else for a minute or so, the slider effectively plays catch up and quickly scrolls through the slides faster than usual until it catches up with the position it would have been in had you not have been looking at another tab and left it to run. This seems to happen in all web browsers as far as I can tell.
I'm having two Ajax-related problems on a page I am working on at the moment. [url] On this page, I have two buttons that use Ajax to fetch two separate forms and put them into a chosen div; that part works like a charm.
On said forms, there is a div that is meant to display any necessary error messages when the submit button is clicked. However, on the first time the page is visited and the form is chosen, the div won't display the error message. Only after refreshing the page/choosing the form a second time will the message show. I've been checking the response from the server via Firebug and the response is correct, it just seems like the page isn't updating correctly.
Secondly, once I refresh or choose the form again and the error message begins to show, if I enter values into the form fields and should be getting a different error message, it never updates. Once again, the server response is correct, but for some reason the page just isn't updating to reflect the new message.
I have been using the date field on the New Event form for testing; if you have Firebug, you should be able to see that I am getting the desired response from the server (look in the allErr div), but the HTML isn't changing with it. I have tried both using my own Ajax functions and using jQuery's Ajax implementation, but both give me the same problems.
A couple of months ago I posted a question in these forums pertaining to some trouble I've been having with a webpage utilizing Javascript and PHP to implement AJAX.
Quote: I'm having two Ajax-related problems on a page I am working on at the moment. (Can't include the link since I'm a new Dev Shed member)
On this page, I have two buttons that use Ajax to fetch two separate forms and put them into a chosen div; that part works like a charm.
On said forms, there is a div that is meant to display any necessary error messages when the submit button is clicked. However, on the first time the page is visited and the form is chosen, the div won't display the error message. Only after refreshing the page/choosing the form a second time will the message show. I've been checking the response from the server via Firebug and the response is correct, it just seems like the page isn't updating correctly.
Secondly, once I refresh or choose the form again and the error message begins to show, if I enter values into the form fields and should be getting a different error message, it never updates. Once again, the server response is correct, but for some reason the page just isn't updating to reflect the new message.
I have been using the date field on the New Event form for testing; if you have Firebug, you should be able to see that I am getting the desired response from the server (look in the allErr div), but the HTML isn't changing with it. I have tried both using my own Ajax functions and using jQuery's Ajax implementation, but both give me the same problems. What am I doing wrong?
version of Apycom's jQuery menu; you can find itat http://apycom.com/ and it is looking really good.I have uploaded files, and published it on a test site - www.flexin.beUnfortunately, some of the submenus starting from the second that haschildren elements, it adds the item on the top level in InternetExplorer.Does anyone on this list has any experience with this library?
I use .append() and .prepend() to automatically add content to a existing html tag with id. In IE the function is working fine but when i viewed it using view source i can't see the content. When i tried it with Chrome, i can immediately see the content. Is there something i missed out?
I have an ASP.net page where I load a record set server side and upload it into a listbox. I'm trying to do all the movement functionalities of the listbox items client side. Specifically, I'm trying to figure out how to copy selected listbox items from one listbox to another -- on button click. I've searched for a while, but every example that I found moves the actual item into another listbox, I just want to copy the selected item to another listbox.
Determine what the previous page was that the user was viewing, even if the user arrived at my site by through the use of a browser function (history, location bar, refresh, etc.). Is this possible?
I'm not wuite sure how document.history functions - what degree of privacy is given to the user and to what extent can web pages get URLs from the user's history?
I'm new to javascript. I'm trying to make a script to load one of a series of images, as hyperlinks, in order, not randomly, on each page load of my site homepage. In addition, I need the script to do the following: if the user first visits today he gets the first image and if he returns to the homepage later today or any other time in the future, the series of images loaded begins with the next image in the series. In other words if there are a series of 4 images, he sees one image each visit to the homepage, in order, and the sequence begins over again once he has viewed all 4 images, regardless of when that is.
I found some code on the 'net that loads images in sequence on each page load, but it only works with the current viewing session, and once the viewer leaves the site the last image they viewed is not kept and the sequence starts from the beginning instead of where they left off.
The code is below, but I can't figure out how to modify it to do what I want.
OK, what I want to do is difficult to explain so please read through. I want to find some way to add items to a form but not have that form submitted to the database just yet, not until it is completely filled with valid items.
On my webpage I have 3 columns and I display a list of items the right hand column. In the center column I have a form with place-holders visible but no items actually entered/chosen yet.
The user clicks on an item (link) in the right hand column and this item should then appear/replace (i.e. it has been added to the users selection in the center column) a place holder in the center column.
I am populating the right hand column from a MySQL database using PHP, but I posted this in the Javascript forum because I think maybe Javascript would be good to use to do this.
I add items to a list of ids within a <TD> named lstCarts using the following code:
function lstCarts_ondblclick() { index = NewProgram.lstCarts.selectedIndex; if (index != -1) { vID = NewProgram.lstCarts.options[index].value; vText = NewProgram.lstCarts.options[index].text; NewProgram.lstNewCarts.options[NewProgram.lstNewCarts.length] = new Option(vText); NewProgram.lstNewCarts.options[NewProgram.lstNewCarts.length - 1].value = vID; eval("NewProgram.Item" + vID + ".value = " + vID); }}
This works fine. When I highlight an item in lstNewCarts and click on a button to delete these items from the list the following code is executed. This doesn't work becauset the selected item does not disappear from the list.
function lstNewCarts_ondblclick() { index = NewProgram.lstNewCarts.selectedIndex; if (index != -1) { vID = NewProgram.lstNewCarts.options[index].value; vText = NewProgram.lstNewCarts.options[index].text; eval("NewProgram.Item" + vID + ".value = -1"); }}
I have some javascript code that enables me to add optional extras via drop down boxes to a total (via an input form text box). Problem is I can add upto 9 different drop down boxes with different amounts that add up in the total box but when I add a tenth it wont add the tenth one up, can anyone helo me I looked through the code and cant suss it out. code...
I am trying to add selected dropdown items (in a popup window) to a hidden input field (inside the parent window). Here is the function I am using but it does not seem to work. Any ideas on what changes I need to make to get it to work?
Code JavaScript:
function addSelectedItemsToParent(domainid) { self.opener.editdomains.parentList[domainid].value = window.document.forms[0].category_1; window.close(); }
I have a javascript index that is similar to the one in the Windows help. It has a text field that allows the you to type text and it finds the closest item in the list below the text field. The list is simply a select element with options that looks like this:
My problem is when I have a large list, the closest entry selects the item in the list at the bottom of the list box, not the top of the list box.
So here's the question: Is there a way to get the list box to display the selected item and move it to the top of the list and not just find it at the bottom?
To get an idea of what I 'want' it to look like, in Windows, go to Help & Support (in XP it's in your start menu) and pick Index. I basically want it to mirror that functionality.
I'm having trouble with a plugin system that I'm working on. It involves binding a doubleclick with two elements that have the same id. The two elements are different plugins, and load appropriately, however the dblclick binding seems to not change between elements. Here's my code(simplified):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">