|
I know of a way that may work, pending on if this hideBox should always override the unChecked when its javascript file is included.
You could opt to override the unChecked javascript method as follows:
var unChecked = (function() {
var original_unChecked = unChecked;
original_unChecked();
hideBox();
});
Its not the neatest way to do it but will do what you want.
|
|
|
|
|
Does anyone know a really good site for codes for the following:
Flash Images
Vertical Scrolling, etc
|
|
|
|
|
|
There are PLENTY around google. If you cant find what ypou want just make it yourself. Its fairly simple , i made one im my first week of learning javacript and jquery (it was simple some buttons and show hides)
It all depends on what your looking for. Although i created a very simple one you could make it much more advanced. You could add little thumbnails instead of buttons , make the background black so the user can see better , add ability to zoom in , just off the top of my head. Probably so many other things i havent even though about.
Again it all depends on needs...
|
|
|
|
|
I would like to replace one interlaced image with another depending on the value a client selects from a dropdown. I currently have it working in that it replaces the image, but the new image isn't displayed until the entire image file has been transferred from the server. I am wondering if there is a way to display the new image as it is downloaded since it is an interlaced png file? My current javascript code is as follows:
function ShowImage() {
var selElmt = document.getElementById('dropdown');
var selection = selElmt.options[selElmt.selectedIndex].text;
document.images['mainImg'].src = selection + '.png';
} And the associated HTML is:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us">
<head>
<title>Image Selector</title>
<script type="text/javascript" src ="Sample.js"></script>
<meta http-equiv="Content-Language" content="en-us" />
<meta http-equiv="Content-Type" content="application/xhtml+xml" />
</head>
<body onload="ShowImage();">
<select onchange="ShowImage();" id="dropdown" name="dropdown">
<option>Image1</option>
<option>Image2</option>
<option>Image3</option>
</select>
<img id="mainImg" src="" width="100%" title="Sample Image" alt="Sample Image" />
</body>
</html> I know that I could pre-load the images if there were only a few options (as in the example), but I have hundreds of thousands of images which makes that approach unfeasible. Most users will only view about 10 of the possible images, and there will be no pattern to their access so I can't try to predict which images will be accessed. The issue that I am attempting to solve is that when I first load the page, the image loads as it is downloaded (ie, I get a low-resolution image displayed immediately, followed by improved resolution as the interlaced pixels arrive). However, all subsequent calls to the function "ShowImage();" on the "onchange" event of the select object waits to display the image until the file has been downloaded from the server in its entirety. Is there some way to make the "onchange" event show the new interlaced image as it is downloaded?
BEGIN EDIT
I am seeing this behavior in Firefox, but in IE7 it does display the image in an interlaced fashion. However, IE7 only downloads one image at a time since I am really displaying multiple images simulteaneously. So I guess the question is, is there a way in IE7 to download/display all images simultaneously, and for FF is there a way to display the images as they are downloaded? Thanks in advance for any help,
END EDIT
Sounds like somebody's got a case of the Mondays
-Jeff
modified on Wednesday, September 22, 2010 10:41 AM
|
|
|
|
|
Hi
I think you would be able to load images according to value selection from dropdown. you should have to define an Array which have loaded all the images during page load.
Then after you can find the index of selected item from dropdown and you will get the item based on index from an Array.
I hope this will help you to resolve the issue.
Please do let me know, if you want something more...
Thanks,
Imdadhusen
sunaSaRa Imdadhusen
+91 99095 44184
+91 02767 284464
|
|
|
|
|
"All of the images" includes 250 GB of data, with somewhere around 1,000,000 images. Therefore, I cannot load all of them into an array (which is what I would normally do), nor can I predict which of the million images will be viewed by the client. I guess I am hoping to find a way to generate 4-16 simultaneous http requests and display the data as I receive it for all images, instead of downloading one at a time. At least then the client would get a blurry approximation of each image right away, instead of waiting until all prior images are completely finished downloading. Any additional help is appreciated,
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
Hi, could you please tell what is Ajax. what is javascript?
I am using ASP.Net for developing web application and some one suggest to learn Ajax and Java Script. could you please give me what ara thoese. what is the difference between Ajax and javascript?
|
|
|
|
|
You probably need much more information than can be added to these forums. I would suggest trying a Google search for both subjects and read some of the information you find. You could also look here[^] for more information related to ASP.Net.
It's time for a new signature.
|
|
|
|
|
|
Hi,
Can any one please suggest me how can I set p3p header in HTML page. I have an application (say domain is www.abc.com) that will load my page "mypage.html" in Iframe( with domain xyz.com). My page is HTML page , in my HTML page I am invoking some other html page say "ExternalPage.html" page with domain PQR.com , Here i have to pass cookies from HTML page (mypage.html) to external page "ExternalPage.html". Since both are different domain ,I am unable to set cookie . I am using below code in mypage.html to allow cookies to set but it is not working . Can anyone please suggest on this.
<meta http-equiv="P3P" content='CP="CNT"'/>
Thanks,
Salmon.
|
|
|
|
|
there is a button in my page that causes a javascript to be invoked. when the POST returns, it causes some HTML elements to be removed. This is because the page's Render is called again and my HTML elements controls is rendered by a javascript framework I am using.
so my solution is to trap 2 events
1. when the button is clicked, i want to set aside this node
2. when the post back returns, i want to reattach this node to where it was.
Can anyone suggest how to do this?
Many thanks!
----------------------------------------------------------
Lorem ipsum dolor sit amet.
|
|
|
|
|
Is it necessary to postback your form? Can it be done via ajax? Otherwise the only way is to persist the node somewhere, viewstate, session, etc. and reattach during rendering.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
yes it is doing it by ajax control toolkit and would require quite a bit of rework to make it to have a server side controller instead of a postback to the page.
i'm thinking of persisting it as a cached DOM object in the browser. Because it's containing DOM element stays, i can clone the removed DOM element (which is a panel) and reattach it to the same node.
my 2 issues are:
1) cloning a DOM object, there doesn't seem to be a raw javascript code that handles. the framework i am using doesn't have it either.
2) trapping the event that fires when the postback response is rendered to the DOM. (adding a listener to the element that causes the postback in the first place is the easy part).
thanks for spending some time thinking about my problem.
----------------------------------------------------------
Lorem ipsum dolor sit amet.
|
|
|
|
|
1) JQuery .clone()[^]
2) AJAX toolkit only gets you so far. Handling the ajax calls yourself gives you the flexibility to do this.
ajaxComplete()[^]
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi,
Working in Acrobat 9.0 forms (not LiveCycle). Have a push button ("MKTGlaunch") to launch a new form from the currently open form. I want to make a check box on the 'parent' form to indicate that the button has been pushed. (i.e. If the button is pushed, program puts a check in the box.)
What is the best way to indicate the action of the button? On the "Mouse Up" there’s already a JS to tell the program to launch the new form, using the "Open a Web Link."
I tried adding a "Run JavaScript" onto another Mouse Up, but nothing happens. I've also tried putting it on the "Mouse Down," but that doesn't work.
But perhaps I'm using the wrong syntax? I'm very much a beginner. This is what I'm using for the Mouse Up/Down:
var MKT = this.getField("MKTGlaunch");
this.getField(MKT.isBoxChecked(0) == true);
Can you give me a push in the right direction?
Is there a better way to do this?
|
|
|
|
|
I don't really understand what the Acrobat 9.0 forms has to do with anything, but if you are just attempting to check a box on the mouseup event, try:
function mouseUpFunc() {
document.getElementById('MKTGlaunch').checked = true;
} And the associated HTML contains something like:
<input type="checkbox" id="MKTGlaunch" />
<input type="button" onclick="mouseUpFunc();" /> Hope this helps!
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
hi guys. i have loop which needs to attach event on some elements. event must fire function and pass value from within loop. so here is problem... when loop is over all events fire same argument that is passed by ref not value at that time.
<a href="#">link 1</a>
<a href="#">link 2</a>
<a href="#">link 3</a>
<script type="text/javascript">
var anchorNiz = document.getElementsByTagName("a");
for(var i=0;i<anchorNiz.length;i++){
var anchor = anchorNiz[i];
anchor.attachEvent("onmouseover",function(){alert(i)});
//this line does same thing, different value
//anchor.attachEvent("onmouseover",function(){alert(anchor)});
}
//the idea is to set links to fire ordinal number, but all are fireing '3'
</script>
|
|
|
|
|
you will get 0, 1 and 2
<a href="#">link 1</a>
<a href="#">link 2</a>
<a href="#">link 3</a>
<script type="text/javascript">
var anchorNiz = document.getElementsByTagName("a");
for(var i=0;i<anchorNiz.length;i++){
var anchor = anchorNiz[i];
anchor.attachEvent("onmouseover",(function(){
var arg = arguments[0];
return function(){
alert(arg);}})(i))
}
</script> also attachevent omly works in IE
modified on Tuesday, September 14, 2010 2:24 PM
|
|
|
|
|
thx. very interesting solution....
|
|
|
|
|
I want to use jQuery and jTemplates to display information returned via a webservice.
The code I am trying is:
function InsertAfter(RowID, json) {
var thisTable = document.getElementById("myTable");
var newRow = thisTable.insertRow(GetRowIndex(RowID));
newCell = newRow.insertCell(0);
newCell.colspan = '3';
newID = RowID + 'Results';
newCell.id = newID;
var template = $('#jTemplateResultsRow').html();
var item = $('#' + newID);
item.setTemplate(template);
item.processTemplate(json);
}
Everything goes fine til I get to the item.setTemplate(template); . Then I get a Microsoft JScript runtime error: Object doesn't support this property or method error.
I have double checked that both the jQuery and jTemplates libraries are loaded and that there are no conflicting javascript templates/frameworks/etc that are referenced.
Both the template and item get set to valid values.
Does anyone have any ideas or suggestions that could help?
---------------------------------------------------------------------
The issue was with the web service returning a nested json string.
All now works
modified on Wednesday, September 22, 2010 12:33 AM
|
|
|
|
|
You need to debug the javascript to see that template and item are both valid items. Depending on the development environment you are using, I tend to just put a debugger; statement in to force the app into the script debugger.
|
|
|
|
|
Thanks Pete,
I fixed this problem a couple of days ago, but forgot to update here.
The issue was mostly that the web service was returning a string with json inside json.
When I figured that out, it all just worked!
|
|
|
|
|
RCoate wrote: When I figured that out, it all just worked!
Good job
|
|
|
|
|
Hi,
Please verify item object which is set or not like set the debug point on following line
item.setTemplate(template);
and see whether item has any value if not then the problem is in following line
var item = $('#' + newID);
Thanks
sunaSaRa Imdadhusen
+91 99095 44184
+91 02767 284464
|
|
|
|