Generating Variables - Pulling Out A Load Of Map Icons From A Database
Jul 22, 2011
I am trying to generate javascript variables. It looks right in the source, but causes a problem. Can someone have a look and tell me why. I have a php script that is pulling out a load of map icons from a database: [URL]
I need to create three dropdown boxes (box 1:colour, box 2: price, box 3:brand) and when the user presses "GO" they are returned with the correct information, pulled from corresponding fields in my MYSQL database.
For example, colour: silver, price £100-£200, brand:samsung...should return 5 items on the page. I do not need the dropdown boxes to populate depending on ther previous selection - they are static, so to speak. If possible, I would like the information to be retuned to my page without the URL changing, which leads me to think I will need to be ausing ajax....?
i'm trying to create some javascript string variables using php. i'm running into a problem because some of the variables span multiple lines and this is causing a problem. here is a sample of what i'm trying to do:
var thetext1=new Array() thetext1[0]="info for #1 goes here" thetext1[1]="info for #2 goes here" thetext1[2]="info for #3 goes here"
etc.... the array values are output from a mysql db using php and used for a script i have on my page.
the problem is some of my strings span multiple lines and end up making it look like:
thetext1[36]= "this is an example of how some stuff spans multiple lines"
Using the javascript console in firefox i see the problem is: "Error: unterminated string literal." I believe it is because the string I am trying to input is spanning multiple lines. any idea on how to fix this?
i'm using php/mysql to create these javascript variables so i have access to their functions. i tried doing this: str_replace( " ", '', $row['text']); to replace the newlines with nothing but they're still there.
I use jQuery MsDropDown plugin to realise a combo box with icons. However, I need to use "title" attribute of the option to indicate the name of the icon. Also I can't use this attribute to write the text I want to show as tooltips.
What I am trying to do is this, when I mouseover a link I want to get one part of the adress and use it as a variable in a mysql-query and get information from the database. I have made the mouseover function to show i div-tag, now i want to populate it with data from the database. Haven't been able to find any tutorials on the subject. So if anyone know how to solve it,
we have a list of names, generated by parsing an array JS source file.The site and the main page is ASP, linked to a Database.Is there a way to store the JS-generated text, inside the Database?To be more clear:Code:
<!-- excerpt from mypage.asp --> <script type="text/javascript"> // VariableNames are an array result, but here we list a simple example:
let's say I have a table "Names" with a field "name" --> bob, and tom (2 records)
I want the ajax/php page to pull out all the names. which would be bob and tom. And then if my database got updated at the backend (ex: a new name jack is added). my page showing bob and tom will automatically be updated with jack showing.
Find a solution to this... I am trying to get a page to load into a div, but only if a database variable is equal to 1, if the variable is not equal to 1, it should check back every 5 seconds. Once the page is loaded into the div, it should stop checking. Also when the page that was loaded into the div is closed, everything starts over again.
a made some 2 buttons on my blog so users can go the next or back trought posts. I think would be interesting to show the posts titles. It's a blogspot blog so i'm trying to use a variable to catch the URL's so i can use them with .load and target the post's title:
$(function(){ var getlink = $("a.blog-pager-newer-link").attr("href"); var gettitle = $('.entry').load(getlink+ "#this-post-title"); //this part won't work!
is it possible to use icons in an outputText ?? and how? i mean something like this<h:outputText style="float:left" value="#{category.title}" image="ui-icon-carat-1-e" /> i have used commandbuttons to get this but it shuold be made without buttons. what i need is just the arrow to be displayed with the text
I found this perfect javascript for creating dynamic connected drop down boxes. This script works fine but there is just one thing I want to add but unfortunately I'm not familiar with javascript enough... I want to display small images when an item is selected from the second drop down. An image should be assigned somehow to each selection from the right hand drop down menu in the code and when someone selects something from the list, an image should be displayed next to it automatically.
<!-- ONE STEP TO INSTALL CONNECTED COMBOXES:
1. Copy the coding into the BODY of your HTML document -->
<!-- STEP ONE: Paste this code into the BODY of your HTML document --> <BODY> <!-- Original: Mikayel Muradyan (mikam@freenet.am) --> <!-- This script and many more are available free online at -->
I am trying to duplicate the graphic effect used in Outlook for sorting Columns, click on it the first time and it sorts descending, click again and it clicks ascending, click on another field and the original image returns and that field is now sorted. I can do the actual sort on the back-end using JSP, and really only need to make the script smart enough to know that another column has been clicked.
A couple of items for consideration, I am working on an intranet, and must support Version 4 browsers. The server I am using is an Iplanet V6.0 server.
I have many links on my page. When the user moves over one of the Links, i want to show two or three small icons (perhaps fade in) on the right side of the link so the user could click on it. When the user moves to another link, the previous shown icons should be hidden (perhaps fade out) and the new icons which belong the new link should be shown and made visible. Is this possible?
Is it possible to create a link to have a window pop up and not have the bar that has the title and minimize/maximize/close icons? If so, how could I do this?
I'm using this sort-table that relies on MooTools.I have one column that contains image icons. I'd like to sort them (perhaps by the "id" attribute), but I'm new to Javascript and don't understand what I'm seeing in the js files enough to customize it.
I am using CuteEditor for my WYSIWYG text editor. I like to hide all the icons until the user click on the textbox editor. Is there a way to do this in jQuery?
I'm building an application. The goal of this subroutine is that the user can upload an image to the browser, and then enter coordinates (X,Y) to place icons and dots at the specified place. way to draw these dots and icons on an uploaded image?
I have been searching how to connect to a database and execute some queries, and then use the data that I get to populate some tables in a web page, all this using javascript.
I am confused because I have seen in some webpages that javascript is not designed to connect with databases, and also I have see other pages where they say that it is possible.
Does anyone know if it is possible to use javascript to connect to a database (informix), and execute some procedures or queries?