I have a CGI application written in C. When I POST (delete data) to the cgi app from the html form, the action is correctly executed on the server but the page does not refresh after the POST. It does flicker, but displays the non-updated page. I then have to hit the browsers refresh to see the correct updated html page (showing data has...
I'm having trouble finding information online for creating a object in javascript and pointing it to a id in the html.
Here's what I have so far for the JavaScript:
function countRecords()
{
headRow=new Object();
//point to specific id here?
var rowCount = 0;
The HTML:
<table id="prodTable">
<tr><th colspan="8">Digital Camer...
$messages = $db->query("SELECT * FROM chatmessages ORDER BY datetime DESC, displayorderid DESC LIMIT 0,10");
while($message = $db->fetch_array($messages)) {
$oldmessages[] = $message['message'];
}
$oldmessages = array_reverse($oldmessages);
?>
<div id="chat">
<?php
for ($count = 0; $count < 9; $count++) {
echo $oldmessages[$count...
On document ready I run this code:
jQuery(document).ready(function(){
jQuery('#button').click(function() {
jQuery('#contact_form').load("/Users/mge/Downloads/jquery-ajax-1/readme.txt");
return false;
});
});
Then if I create a form like
<div id="contact_form">
<form name="contact" met...
var fruits = [ 'apple', 'banana', 'orange' ];
how do I find what index of the value "banana" is? (which, of course, is "1").
thanks
...
Hello guys,
I hope I can explain this right I have two input fields that require a price to be entered into them in order for donation to go through and submit.
The problem that I am having is that I would like the validation process check to see if one of the two fields has a value if so then proceed to submit. If both fields are empt...
I have been doing javascript development for the last couple weeks and have tried JSDT and Aptana to assist in code completion. JSDT wasn't very good at all, but I did have more luck with Aptana (used as eclipse plug-in, not the standalone product). The problem I'm encountering is that when I create javascript classes I cannot get code...
What would be the best way to create a JS chat client with GWT? The bit that I'm having trouble with is the persistence and transfer of the messages. Should I store the messages in a DB and check the db for new messages? Is there a much better way to do this?
...
I am talking about doing something like this:
http://stackoverflow.com/questions/1375714/load-external-javascript-on-function-call
from flash by using ExternalInterface probably
...
How can I customize automatically generated command button, e.g. Delete?
I want to add a client confirmation on deleting and in the same moment I want this button would be generated on setting AutoGenerateDeleteButton="true". Is it possible??
I can add a custom button this way:
<asp:TemplateField>
<ItemTemplate>
<asp:LinkB...
I have a load action tied to the submit button of a form.
jQuery('#content').load("/control/ajxdata/installs.php?country=" + country);
jQuery('#content').load("/control/ajxdata/installs.php",{ 'country': country });
The name, and the id of the form element I am trying to utilize is "country"
In the error console, I am getting "E...
Hello,
I got this code which works:
<html>
<head>
<title>JS highlighting test</title>
<script type="text/javascript">
function highlight()
{
var t = document.getElementById('highlight').innerHTML;
t = t.replace(/(if|switch|for|while)\s*(\()/gi, "<b>$1</b>$2");
document.ge...
I have an interesting problem here. I'm using a class on the element as a switch to drive a fair amount of layout behavior on my site.
If the class is applied, certain things happen, and if the class isn't applied, they don't happen. Javascript is used to apply and remove the class. The relevant CSS is roughly like this:
.rightSide { ...
Hi,
Is there a way to avoid the time delay required to access the functions defined inside a SWF object after dynamically adding the object to the DOM.
for example,
1) I'm using swfobject.js api to add swf object dynamically add the SWF object to the DOM.
var oSWF = new SWFObject("SWF Object path reference","SWF object ID", "100%","7...
I'm using the relatively immature Joose Javascript ORM plugin (project page) to persist objects in an Appcelerator Titanium (company page) mobile project. Since it's client side storage, the application has to check to see if the database is initialized before starting up the ORM since it inspects the DB tables to construct the classes. ...
Hello fellow front-end web h4X0|2s,
I was wondering if anyone had any resources, proof, or personal experience in using the age-old http/https JavaScript hack:
<script src="//someserver.com/js/script.js"></script>
Has anyone encountered issues in any of these browsers (IE 5.5+, FF2+, Chrome, Opera 9+, Safari 3+)? Has anybody had su...
What does ! mean in pseudo-code? I know ! stands for factorial but I can't translate it .
ex:
get operation
if (operation!= ’B’ OR operation != ’D’ OR operation!= ’W’) then
print "Invalid Operation"
What does it mean? Please help my mid-term is in hours :S
Thanks in advance for your help :)
...
I am trying to use this regex (JS):
/\/\*(.*)\*\//g
To replace
/*
sdandsads
*/
with nothing.
But it is not working! Why? o_O
...
I have this js code:
$("#startSearch").live("click", function(event) {
$("input:checkbox[name='searchId']:checked").each(function() {
var searchId = $(this).val();
var host = '';
$.post("php/autosearch-get-host.php",{sId: searchId},function(data){
host = 'http://' + data + '/index.php';
})...
I have a div, which has jQuery UI Draggable applied. What I want to do, is click and drag that, and create a clone that is kept in the dom and not removed when dropped.
Think of a deck of cards, my box element is the deck, and I want to pull cards/divs off that deck and have them laying around my page, but they would be clones of the ...