Currently I using the following code to get my JSON output from MySQL.
<?php
$session = mysql_connect('localhost','name','pass');
mysql_select_db('dbname', $session);
$result= mysql_query('SELECT message FROM posts', $session);
$somethings = array();
while ($row = mysql_fetch_assoc($result)) {
$somethings[] = $row;...
I'm using a flash rotating banner in my website which takes images and descriptions from an XML file.
I do changes to my XML very often... but in my local machine, the banner takes a day or two to get updated.
Although I can clear my local machine's cache, the problem still remains for other users who visit my web page..
is there a ...
I want to verify that the HTML tags present in a source string are also present in a target string.
For example:
>> source = '<em>Hello</em><label>What's your name</label>'
>> verify_target(’<em>Hi</em><label>My name is Jim</label>')
True
>> verify_target('<label>My name is Jim</label><em>Hi</em>')
True
>> verify_target('<em>Hi<label>M...
I'm building a browser extension that will insert a chunk of HTML into some pages. I'd like the page's CSS to not apply to this section. What is the best way to do this? Is there a good reset I can put on the root element of my HTML and set it to !important so it gets applied after others?
...
Hi, I made this onlick property for my checkbox, my js-fu is like, not there, how can I simply add a border color property as well as bg color?
<div id="akseptwrap">
<span style="left:-20px; position:relative; top:3px;"><img src="http://euroworker.no/public/upload/1_2_arrow.gif"></span>
<span id="salgsaksept">
...
I have around 50-60 components and some of the fields are readonly. Now I want to set the tab index only for the fields that are read/write.
Now the problem for me is, some of the components will be added according to the selection in my dropdown list box. Those components that are newly populated also contains some read only text boxes...
I've been developing for a while and often develop sites using menu tabs.
And I can't figure out why so many web developers like using lists < ul >< li > etc rather than just using plain old divs.
I can make menus in divs which are simple and work perfectly in every browser. With lists, I'm usually trying to hack it one way or anoth...
Hello,
I was wondering what would be the best way to implement some kind of "drag n drop" user interface?
What i mean is that there would be one main page and every link click (eg. other sections like about, gallery, contact form) would open a new drag n drop element on top of that main page. Something like windows desktop where you ca...
I have a code that is a mmix of html and js. I cannot get it correct.
location.description + '<br><a href="javascript:void(0);" onclick="showStreet;">ShowStreet </a><br>'+ location.lat + '<br> + location.lng
Can anyone help me with it?
...
Exists an algorithm that calculate the position of nodes of a connected graph?
I like to draw the nodes of the graph as HTML DIV and have an algorithm that allows to positionate the nodes on the html page (using absolute position) according to the connections , like a mind map.
...
Some simple HTMl, I've added spans for styling, should I be using labels instead? It's meant to only allow one selected at a time. What am I doing wrong? I am codeblind :P
JSfiddle here.
Thanks.
...
I am styling a Wordpress theme but has run into problem with IE7.
The first word("it") inside the paragraph/strong tag ends up to the left of the img tag when I want it BELOW the image.
My problem is that the only element I can change CSS properties here is the div, since the code inside is posted with a WYSIWYG by an blog author.
Is ...
Im editing the html of a myspace page to insert a form. For the 'action' attribute of the form I have a web address (naturally). It works fine on a real website, but what happens with myspace is that any links you enter are routed through the server (I believe) are replaced with an msplinks link instead. This royally effs up my form and ...
I am trying to retrieve the parent of an element's parent (grandparent?). I want to find that grandparent, then find a tag in that element, then store that text as a variable to publish elsewhere on the page. I've been trying to use the parent() function but without success.
Here's the code I tried:
$('.mixPlayCell a').click( fun...
Hi, I have the below code and I am trying to get each "users post" into a seprate div, currently it shows all the posts in one div. Am sure its something simple I have just messed up on, this isn't finished yet so some parts in the code are still abit dodgy.
<?php
if (loggedin())
{
$ID = getID();
$query = "SELECT * FROM `posts`";
$res...
hi
does anyone know any sort of app that lets users visit a page on their mobile phone, enter information and have it update the website
i believe the term is "mobile-blogging" but there isn't all that much on google
or, is there any good resources for coding pages specifically for a mobile phone? I could probably design a script to i...
Below are the options that i have in my code
<label id="subn">
<select name="subs" id="subs">
<option value="nothing">Choose a Subject</option>
<option value="General Question">General Question</option>
<option value="MemberShip Area">MemberShip Area</option>
<option value="Others">Others</option>
...
Hey guys,
I'm trying to call a java implemented web service (using the NetBeans IDE) from javascript. I have read a lot about jQuery and AJAX but i cant seem to get a hand on it.
suppose my web service WSDL is found at: http://localhost:8080/MICE_Server/MapEditorService?WSDL
web method name : sayHello(String name) which returns a stri...
I am using the p tag to align text left and right on the same line using:
.left
{
float: left;
text-indent: 5px;
margin-top: 0px;
}
.right
{
float: right;
text-indent: 5px;
margin-top: 0px;
}
<div id="content">
<p class="left">Left Text </p>
<p class="right">Right Text </p>
</div>
The left text wil...
I need to apply/remove to an input field according to a user's selection in a separate drop down form - but I can't figure out how to target the input's class.
I need to add/remove the 'pageRequired' class from this input:
<input type="text" title="Company Required" name="customfields-tf-2-tf" class="inputclass pageRequired textInput...