|
Hi all,
Im trying to make the slideshow using javascript, the images will be available in the folder. My requirement is the images can be replaced at anytime in the folder, according to that the script retrives the available images from the directory and should play the slide show. Please let me know how to achieve and also provide if any code snippet if you have.
Thanks
Kanna
|
|
|
|
|
http://www.a1javascripts.com/
http://www.javascriptkit.com/
|
|
|
|
|
This[^] is what JSOP is using.
|
|
|
|
|
|
For the slideshow for dynamic fetching of images, refer the link below.
http://www.dynamicdrive.com/dynamicindex14/flexislide.htm
-Manognya
__________________________________________________
$ God gives what is best.Not what all you wish
|
|
|
|
|
Hi,
How to find the Find X,Y position of a element, which is working both in IE and Firefox. Codes from net not working in mozilla.
Thankyou
|
|
|
|
|
use property .style (CSS)
complete HTML and DHTML reference for IE see
http://msdn.microsoft.com/en-us/library/ms533050.aspx
.position see http://msdn.microsoft.com/en-us/library/ms531140.aspx
|
|
|
|
|
Try this:
var e = document.getElementById(id), x = e.offsetLeft, y = e.offsetTop;
while(e = e.offsetParent) {
x += e.offsetLeft;
y += e.offsetTop;
}
|
|
|
|
|
Anybody knows how disable refresh when enter key pressed in the form input text in JavaScript?
I have this JavaScript code
function runScript(e){
if(e.keyCode == 13){
var div = document.createElement("div");
div.setAttribute("class", "resultItem");
var parentDiv = document.getElementById("result");
var input = document.getElementById("txtBox");
div.innerHTML = input.value;
parentDiv.appendChild(div);
}
}
My HTML code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Untitled Document</title>
<script src="script.js"></script>
</head>
<body>
<form>
<fieldset>
Website URL:
<input id="txtBox" type="url" onKeyPress="return runScript(event)"/>
</fieldset>
</form>
<div id="result">
<h2>URL List</h2>
</div>
</body>
</html>
My problem is when everytime I hit enter on my keyboard it refresh the page. I want it in every enter the value in the text box will be displayed below the URL List. Any help will be appreciated
|
|
|
|
|
hi,
flashery wrote: <input id="txtBox" type="url" önKeyPress="return runScript(event)"/>
Try this one
<input id="txtBox" type="url" onkeydown="javascript:return runScript(event)" onkeypress="javascript:return false;"/>
|
|
|
|
|
I cant type anything on my textbox.. Maybe its because of this onkeypress="javascript:return false;"
|
|
|
|
|
may be for oncontextmenu:
window.event.returnValue=false; // result not a return
return false; // oncontextmenu may be visible
so for other events may be too (ignore of return value).
if possible ....
read out an event
if(window.event!=null)
{X01=window.event;
if(X01.srcElement!=null)
{X02=X01.srcElement;
d010[0]=X02;
if(X02.tagName!=null){d010[1]=X02.tagName;}
d010[2]=X01.returnValue;
d010[3]=X01.type;
d010[4]=X01.cancelBubble;
d010[5]=X01.reason;
d010[6]=X01.propertyName;
X00=true;
}
}
save cancelBubble
i.e. fireEvent() set cancelBubble allways to false
X03=window.event.cancelBubble;
X04=document.createEventObject();
X02=X00.fireEvent(X01,X04);
window.event.cancelBubble=X03;
Syntax
bFired = object.fireEvent(sEvent [, oEventObject])
Parameters
sEvent Required. String that specifies the name of the event to fire.
oEventObject Optional. Object that specifies the event object from which to obtain event object properties.
erzeugt mit document.createEventObject()
Return Value
Boolean. Returns one of the following values:
true Event fired successfully.
false Event was cancelled
function fnFireEvents()
{
oDiv.innerText = "The cursor has moved over me!";
oButton.fireEvent("onclick");
}
Using the fireEvent method
By moving the cursor over the DIV below, the button is clicked.
Mouse over this!
Button
|
|
|
|
|
Thanks man but this code is really to advance for me> I'm just learning JavaScript. But thanks anyway..
How about this code
function disableRefresh(e){
if(e.keyCode == 13){
return false;
}
}
this makes the following code after
return false; execute without refreshing the page and it work for me.
My html textbox is look like this.
<form>
<input id="txtBox" onKeyPress="disableRefresh(event)" type="text" />
/form>
Correct me if I'm wrong cause this is the best and simple way for me to do this.
|
|
|
|
|
disableRefresh(event) // param event must have type of object event
// disableRefresh(this) give the pointer of INPUT that have an event like onkeypress
|
|
|
|
|
add a input type text belowe it.
demo: u want disable refesh when enter key pressed on input name 'a'
<form>
<input type='text' name='a'/>
<input type='text' style='display:none'/>
<input type='submit' value='submit'>
</form>
Now u can press enter key and page will not reload
|
|
|
|
|
Hi friends,
i am having aspx page with information ... andone js file contains code for overlay... i want to populate the span information as overlay content..
thanks in advance
|
|
|
|
|
Hi,
I had written javascript code using window.open( ).I want to enable the pop-up blocker using javascript,instead enabling manually.
Any idea.
Guhananth.S
|
|
|
|
|
Javascript is readable code during parsing. Every body can turn on off
popup blocker of browser .... easy way of full risk for user of browser.
You want control GUI of browsers and popup-blockers with javascript
during parsing of webpage - all browsers in same way --> in use of
html DOM ?
I think: NOT possible.
So see http://www.w3schools.com/htmldom/dom_intro.asp
|
|
|
|
|
|
|
I am building an interface that will be run only locally on users computers using HTML (no web servers involved). What I'd like to do as part of this project is to be able to list the contents of local folders related to this project. Meaning I have a parent folder that will contain all the HTML pages as well as folders with PDF files in them. From my main page I'd like to have a link to those folders and when visited, that link would list the files in that folder. This way, when additional files are added or when files are deleted, the listing will reflect the actual folder contents. Right now this works by linking to the folders and getting the raw Directory listing but the listings are not pretty. I am looking for a more elegant way to achieve this.
Anyone know how to do this with HTML or Javascript?
Thanks,
Craig
|
|
|
|
|
|
I am trying for a javascript code that would ask for the excel file location when run, fetch data from two columns till eof in an excel file (MS Excel 2010), append it to an existing text file and upload the plain text file to an ftp location.
The ftp username, password and location needs to be hard coded in the script.
Is this possible?
|
|
|
|
|
Hi,
javascript runs on client: readable code (after parsing)
debug with firefox and see passwords --> ftp is open for every body.
use Oracle Java.
|
|
|
|
|
I've spent days looking for a way to use jQuery drag & drop with table rows but have only been able to find ways to save/update the database for list items, not rows. The other issue I have is that my page only has one row and pulls from a database with a repeat region loop that creates new rows so I have no way to create id's for each new row. If anyone can help me out with a script that would update my database after a jQuery drag & drop, I'd really appreciate it. Here's an example of my code that works except for the updates:
<pre lang="PHP">
<?php require_once('Connections/dragdrop.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$maxRows_rsView = 10;
$pageNum_rsView = 0;
if (isset($_GET['pageNum_rsView'])) {
$pageNum_rsView = $_GET['pageNum_rsView'];
}
$startRow_rsView = $pageNum_rsView * $maxRows_rsView;
mysql_select_db($database_dragdrop, $dragdrop);
$query_rsView = "SELECT * FROM records";
$query_limit_rsView = sprintf("%s LIMIT %d, %d", $query_rsView, $startRow_rsView, $maxRows_rsView);
$rsView = mysql_query($query_limit_rsView, $dragdrop) or die(mysql_error());
$row_rsView = mysql_fetch_assoc($rsView);
if (isset($_GET['totalRows_rsView'])) {
$totalRows_rsView = $_GET['totalRows_rsView'];
} else {
$all_rsView = mysql_query($query_rsView);
$totalRows_rsView = mysql_num_rows($all_rsView);
}
$totalPages_rsView = ceil($totalRows_rsView/$maxRows_rsView)-1;
?><!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type='text/javascript' src="jquery-1.7.1.min.js"></script>
<script src="jquery.tablednd_0_5.js" type="text/javascript"></script>
<!-- Add in the jQuery draggability -->
<script type="text/javascript">
$(document).ready(function() {
$("#table-1").tableDnD();
});
</script>
</head>
<body>
<table id="table-1" width="600" border="1" cellpadding="5">
<tr>
<td>ID</td>
<td>Rank</td>
<td>Text</td>
<td>Listing ID</td>
</tr>
<?php do { ?>
<tr id="1">
<td><?php echo $row_rsView['recordID']; ?></td>
<td><?php echo $row_rsView['Rank']; ?></td>
<td><?php echo $row_rsView['recordText']; ?></td>
<td><?php echo $row_rsView['recordListingID']; ?></td>
</tr>
<?php } while ($row_rsView = mysql_fetch_assoc($rsView)); ?>
</table>
</body>
</html>
<?php
mysql_free_result($rsView);
?>
|
|
|
|