AJAX :: Implementation Of Virtual Mode In ListView?
Aug 3, 2010
Did anyone implement or can direct me to an implementation of virtual mode (render only visible rows, but still have the scroll work right) or something similar in the AJAX Sys.Preview.UI.Data.ListView?
I need to display a very large table (`1000 rows) and it simply isn't feasible to render everything.
View 1 Replies
Oct 12, 2009
I wanna make a live-error-checking sign up form.
So these are the codes
this is the php file which return echos to the js files (there's no error here, I've posted this so you know what it's all about) [code]...
if a user writes in the text box for nickname a nickname that is already registred then in a text box near the input text it will appear something like : "This Login name is already taken!"
and so on for every field (firstname, lastname...)
I have done this previously with classic ajax tehnics (that with onreadystatechanged) and it worked. But this version does not. Can you spot the error here?
View 1 Replies
View Related
Jun 28, 2010
I am trying to write some JavaScript that locations to a hash. I use something like this.
Code:
The problem is I use the same code in two different pages. One is in quirks mode ie8, and one is in standards mode ie8. The one in quirksmode works, the one in standrds mode doesn't.
Any idea what could cause such a thing? I know hash can work in standards mode. However, do you have any idea what is wrong? I am kind of searching for a needle in a hay stack, here.
View 4 Replies
View Related
Apr 7, 2010
I have a problem which I am not able to solve. I read a lot and tried many things but without being successful. Mhh.. The problem I struggle with is a simple .toggle() of a DIV. This is working fine. But now I do an ajax request and get the response back from my javascript ajax implementation (I'm using ajax anywhere). Within this implementation I work inside a callback routine which makes it possible accessing the response before updateing the DOM. Inside this routine I want to .toggle() but this is not working. It happens just nothing. I also do not get any javascript errors. As soon as the request is completly done I am able to .toggle() again.
When I am accessing the DIV by using jquery ($('#div_id')) it is referenced to the correct object within de document. Only the .toggle() does not work. .hide() for example is working fine.
Background: I am doing this like this, because I want to know if the response contains validation erros. If so I leave the DIV with the form inside as it is an highlight the error. Otherwise (no errors) I close the div with .toggle(), update the dom with the new form and open the DIV again.
Many reports are facing a problem that they lose the jquery binding. But this is not my problem as far as I understand.
View 2 Replies
View Related
Aug 26, 2010
When I try to fetch a page asyncronously I get a status 0 and the response text is empty: PHP Code:
var loaderImage = document.getElementById("loader");
loaderImage.style.display = "inline";
xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState==4 && xmlhttp.status == 200) {
response = xmlhttp.responseText;
alert(response);
[Code]....
View 7 Replies
View Related
Dec 2, 2010
I have a very recent version of JQuery Treeview 1.4.1 & also a very recent version of JQuery UI.
I tried a lot but couldnt fix this problem. I have an initTree(), that loads tree like this:
function initTrees() {
$("#products").empty();
$("#products").treeview( {
url : "getTestDataInTreeView.action",
[Code].....
View 1 Replies
View Related
Jan 29, 2009
Tabs jQuery v2.7.4 of stilbuero. I want to use Ajax Mode and open the links in a specifically container. For example:
<div id="box">
<ul id="tabs">
<li><a href="01.html"><span>Tab one</span></a></li>
<li><a href="02.html"><span>Tab two</span></a></li>
<li><a href="03.html"><span>Tab three</span></a></li>
</ul></div>
...
<div id="container"></div><!-- Open external links here (01.html, 02.html and 03.html) -->
View 4 Replies
View Related
May 9, 2011
I have seen that i can avoid the char # from my urls if i use the directly link to the pages and selet a TARGET to them... but for this i have use the target option in the <a> code:
<li><h2>
<img src="img/prensa.png" class="ui-li-icon"/>
<a href="subcategoria/prensa/prensa.html" target="_self"> Prensa </a>
[code]....
View 2 Replies
View Related
Feb 10, 2006
I have an interesting problem. I have created an html based interface that
links to an external .js file with only functions in it. The functions set
an arrays values depending on which function is called by the interface....
The external .js file looks like this below:
function myFunction1(){
arryEntry[0] = "some value1";
arryEntry[1] = "some value2";
arryEntry[2] = "some value3";
arryEntry[3] = "some value4";
}
function myFunction2(){
arryEntry[0] = "other value1";
arryEntry[1] = "other value2";
arryEntry[2] = "other value3";
arryEntry[3] = "other value4";
}
etc...
In the html interface I am calling the function(s) depending on a list
selection. This functions one arg (functionNumber) depends on a list
selection.
function getArryEntries(functionNumber){
eval("myFunction"+parseInt(functionNumber)+"()");
var value0 = arryEntry[0];
var value1 = arryEntry[1];
var value2 = arryEntry[2];
var value3 = arryEntry[3];
}
This all works well so far and the array entries are changed successfully
depending on the getArryEntries(functionNumber) selection.
However, at some time in the session I am adding (actually writing)
additional functions to the external .js file. Appending to the file. The
problem is that the interface will not pick up the newly written functions
on runtime. If the interface is closed and opened again, then it can see the
new functions.
I thought of initiating an array of the existing functions when the
interface loads and append to the array when the new functions are created.
It would then write to the file, but use the array at runtime. No success so
far.
View 1 Replies
View Related
Jun 21, 2007
This function will produce a URL that appears to be a file.
There are two versions:
1. a 500-pound gorilla version that accepts almost anything as input.
2. a lightweight version that turns strings into virtual HTML files.
First I'll mention the one major drawback: IE doesn't recognize data urls (http://en.wikipedia.org/wiki/Data:_URI_scheme) yet.
For a Live Demo, paste this into your addressbar and click go. (press back to return).
data:text/html;charset=utf-8;base64,PGI+aGVsbG8gd29ybGQ8L2I+
//output of: dataUrl("<b>hello world</b>", "text/html")
With that out of the way, here's the code:
function dataUrl(data, mimeType){ // turns a string into a url that appears as a file. (to ff/op/saf)
encType= (!!btoa) ? ";base64" : "";
var esc = (!!encType) ? function(d){return btoa(d);} : function(d){return escape(d);};
if(!mimeType){mimeType= (data.nodeName) ? "text/html" :"text/plain";};
b="data:"+mimeType+";charset="+document.characterSet+"+encType+",";
if ("string number date boolean function".indexOf(typeof data) > -1){ b+=esc(data.toString()); return b; };
if ( data.constructor==Array){b+= esc( data.join("") );return b; };
if(typeof data=="xml"){b+=esc(data.toSource()); return b;} //FF2 xml frag/doc
//for more complicated data, attempt to determine the format.
if(typeof data=="object"){
if(!!data.value && !!data.value.length){b+=esc(data.value); return b;}; //input tags w/content
if(!!data.innerHTML){b+=esc(data.innerHTML); return b;} //HTML tag
if(!!data.length){ //weird stuff like nodelists
var G=function(ob){r=[]; i=0;
for(i;i<ob.length;i++){
if(dataUrl(ob)) r=dataUrl(ob[i]);} return r.join("
");};//end g
return(b+G(data));}//end if object w/length
if(!! eval(data.toSource()) ){b+=esc(data.toSource()); return b;}; //JSON
}//end if object
return;
} //end function dataUrl
function dataUrlStr(data){ return ("data:text/html,"+escape(data));}
Usage: dataUrl(data, mimeType)
data- The desired contents of the file
mimeType- The type of content you want the browser to see.
output: An encoded string representation of the file; an href.
The output 'file' could be any text-based file format, depending upon what you set mimeType to be:
-HTML document (yawn) (text/html)
-Rss feed (text/xml)
-M3U playlist (audio/mpegurl)
-Excel spreadsheet, CSV (application/vnd.ms-excel)
-JavaScript (text/javascript)
-StyleSheet (text/css)
- You get the idea...
Input Details:
-Can accept [I]almost any javascript type: strings, numbers, arrays (which it will flatten), nodes, node lists, xml objects in FF2, functions (for which it outputs the source code), complex JSON objects, and dates. (whew, I think that's all of 'em...)
-if you want to output an element as html, or anything else as text, you can skip the mimeType argument.
Notes:
-You will most likely want to assign the output to a link href or the .scr of a script, stylesheet, or iframe, or to window.location.href.
-If you assign it to an iframe or object, it will load immediately.
-assigning it to a (<a>) tag will let you 'right-click, SaveAs' the file.
-clicking the link will open the 'file' in the browser just like a regular file.
-output an html document that has scripts, and they execute immediately.
-the cool thing about this is that the script will have a clean context. (no global variables from the parent).
-if used in an iframe- it can push to main page via window.top .
-if used in with an <object>, it will be completely private.
Caveats:
-doesn't work with IE yet.
-'saving As' doesn't offer a default file extention.
-there is 2kb limit for safari and opera URLs.
-search engines cannot see the links.
-XmlHTTP Requests from within usually don't work.
Examples:
To save my fingers, I will utilize the follow shortcut functions in these examples:
function el(tid) {return document.getElementById(tid)};
function tags(tid) {return document.getElementsByTagName(tid)};
//test
tags("a")[0].href=dataUrlStr("<b>Hello World!</b>")
//make a 2D array into an Excel SpreadSheet - (works with 1D lists also)
var grades= [["Subject" , "Grade"],
["Math", "A" ],
["English", "B+" ],
["Gym","C" ],
["Art","A-" ],
["Science","A+" ] ]
var exl=grades.join("
").toString().replace(/,/g , " ")
window.location.href=dataUrl(exl, "application/vnd.ms-excel")
//note: if data contains commas: loop through main, .join(' ') each index.
//execute script in a fresh enviroment:
window.testme="123456789"; //make a new global
var testJs="<script>alert('hidden window.testme='+ window.testme )</script>";
var fr= document.createElement("iframe");
fr.id="hiddenframe";
fr.style.display='none'
document.body.appendChild(fr); //add a hidden frame
alert("main window.testme="+window.testme);
el("hiddenframe").src=dataUrlStr(testJs);
//re-using the above example, pass existing functions to the hidden frame, and return the result.
var tJs="<script>";
tJs+=[tags, el].join("
"); //bundle a couple functions
tJs+="
alert('hidden window has '+tags('*').length)"
tJs+="</script>";
el("hiddenframe").src=dataUrlStr(tJs)
//open a playlist
var plTxt="#EXTM3U
#EXTINF:202,Minuet in G
http://www.mfiles.org.uk/downloads/beethoven-minuet-in-G.mp3"
el("hiddenframe").src=dataUrl(plTxt, "audio/mpegurl"
//open all the 'code' on this page as a plain text document.
function ob2Array(ob){var r=[]; for(var z=0; z<ob.length;z++){r[z]=ob[z]};return r};
function group( List, f) //applies a function (f) to an array and returns result...
{var z=0; Ray=[]; len=List.length;for (z;z<len;z++){Ray[Ray.length]=f(List[z]); }
return Ray;};
var codes=group(ob2Array(tags("pre")), function(x){if(x.className=="alt2")return x.textContent});
window.location.href=dataUrl(codes)
//make this thread into an rss feed
function tag(nd, tx){ return ["<",nd,">",tx,"</",nd,">"].join("")}
function dp (s) {var d = new Date();d.setTime(Date.parse(s)); return d.toUTCString()}
var X=PHP.htmlspecialchars
var chan=[]; var y = new Date();
chan[0]=tag("title", "CodingForums.com");
chan[1]=tag("link", window.location.href);
y.setTime(ajax_last_post+"000")
chan[2]=tag("pubDate", y.toUTCString())
chan[3]=tag("link", "http://www.codingforums.com/")
var codes=Group(ob2Array(tags("table")), function(x){
var i=[];d=""; p=d; t=d; l=d;j=d;a=0;
if(x.id.substr(0,4)=="post"){
p=tag("pubDate", dp(x.rows[0].cells[0].textContent.replace(/-/g, "/")));
t=tag("title", document.title)
l=tag("link", "http://www.codingforums.com/showpost.php?p="+tags("table")[5].id.substr(4))
ta=x.rows[1].cells[0].getElementsByTagName('a')[0]
a="<author>"+ta.href+" ("+ta.textContent+") </author>";
d=X(x.rows[1].cells[1].textContent.toString())
j=[d,t,p,l,a].join("
");
return tag('item', j)
}//end if
});
tags("a")[2].href=dataUrl(tag("channel", chan.join("
") + codes), "text/xml")
So, i think that should be enough examples to get going.
[I]"The only limitation is your imagination"
View 4 Replies
View Related
Jul 9, 2004
Here is a virtual train set I've made. To place a piece, select it from the drop-down and click 'Go!'. The train will always start on the top-right hand square, then go right.
When you open the page, enter how many rows and columns there should be in the grid: the default is 16 X 16.
View 11 Replies
View Related
Jun 4, 2004
This is my implementation of an n x m matrix in JS:
var n=parseInt(prompt("n:",1));
var m=parseInt(prompt("m:",1));
function array(){
this.length=m+1;
for (var i=1;i<=m;i++)
this[i]=0;
}
function matrix(){
this.length=n+1;
for (var i=1;i<=n;i++)
this[i]=new array;
}
var a = new matrix();
View 9 Replies
View Related
Jun 7, 2011
I started studying javascript when I decided that I wanted to create a dynamic webpage after viewing some books that were made to pageflip with Javascript and after viewing a ton of animations. So I figured since everyone keeps saying Javascript is simple that if all I wanted to do was to make a book extend outwards on mouseover and then open up on click and flip pages which they already have a code for that it wouldn't be so difficult. I've read everything I could practiced a little bit, I'm not fluent but I do have a goal and a time. The problem for me comes up with figuring out what I need to do in order to make it appear as if the book is coming out of a book shelf. There is a lot of information on animations where flat objects rise above clouds.
I am thinking that I would have to use some sort of sprite of a row of books both sorta sideways where you can see the side of the book as well as the edge, and both a row of books on a shelf, or perhaps a row of books with some of the books being pulled out and then on mouse over animate the scene so that it looks like the book is being pulled out. Would that work? Or is there a simpler way? Another way or I don't know. Is there a code that can make it look like a book is extending outwards without an animation or would I need to create an animation for that?
View 3 Replies
View Related
Jul 20, 2005
Is there a good linked list implementation in the public domain? Or
that someone on this group has already written that they'd like to put
in the public domain, right here on this newsgroup?
View 3 Replies
View Related
Jun 22, 2010
I have a request to implement iGoogle like UI features, specifically, the drag/drop module boxes, and configurable elements for each module box. Currently, I have existing module box with all the forms and elements (backend support for them too). But they are not drag and droppable, and not configurable.My questions are: 1. Do I need backend engineering involved in this implementation? my understanding is: it's pretty much front end UI work and backend already provided all the form elements, backend DB, etc. for this.But my only concern is: how can the system save the user's configuration when they login the next time? Do I need backend engineering's help for this? related DB setup, java class files, etc? 2. is there any jquery UI API/plugin I can take advantage of so that I don't have to do everything from scratch?
View 1 Replies
View Related
Jul 9, 2010
I'm looking for a Triple DES implementation in Javascript.
My requirement is that I need to encrypt data using Triple DES in Javascript and decrypt on server side using C#. I found a few, but I'm unable to decrypt the data in .Net.
View 3 Replies
View Related
Jul 24, 2010
I call this function
Code:
function showForm() {
if (!document.implementation.hasFeature("Core", "3.0")) {
alert("1");//[code].....
on FireFox 3 and only the alert marked with //go off. In IE 8 on the other hand all of them go off. These are features described in JavaScript for WebDevelopers 2nd edition.This cannot possibly mean that IE 8 is missing all these features...what is qrong then?!?!
View 14 Replies
View Related
Jun 8, 2007
How is it possible to define a constant in a virtual class?
E.g. I wrote the following code
tml = {
sayHello : function()
{
alert('hello');
}}
now if I want to add a constant into tml virtual class, what I need to
do?
I tried something like
tml = {
const1 : Integer = 0,
sayHello : function()
or
tml = {
const1 : function(){return 0;},
sayHello : function()
in both case, trying to get - inside tml object - the value of
const1 ... it results in a Object value and not the Integer value I
need.
View 4 Replies
View Related
Feb 11, 2010
I am doing a virtual point of sales page. Once the user has paid, he should be readdressed to the original web page. But this doesn't happen. I have realized the payment bank code is window.opener.location='[URL]'. I have copied their code and changed that by window.open ("[URL]") and it perfectly works. I have replicated the situation in these links...
The one that doesn't work [URL]
And the one I have modified and works [URL]
They insist their code is ok. Obviously I cannot modify their code located in their server.
View 2 Replies
View Related
Aug 2, 2010
How can I implement a simple virtual keyboard for a website... the only things I need is a number pad(0 -9)...
is a way to implement it as simple as possible using the Javascript...
View 6 Replies
View Related
Aug 31, 2011
I am so stuck on making a virtual keyboard using jquery. I found a great tutorial on nettuts however it requires you to click the letters on the virtual keyboard instead of using your actual keyboard and typing it. Does anybody know any tutorials that offer that or any suggestions? I know i have to use the keydown method but I really don't understand it. Here is an example of what it is suppose to be.
View 2 Replies
View Related