|
function changeImage() {
var img = document.getElementById('img');
var foo = new Date;
img.src = "a.jpg"+ foo.getTime();
}
|
|
|
|
|
Might be I not uderstand well ... did you mean:
When web-user click on the Image link, then it will invoke the script (changeImage) & show the desired image (a.jpg)?
If yes, then I have the problem: With your codes, I must know which picture I have to show first! My problem is that I have to wait someone change the selection (the same page) & I don't know how to read the new selection without jumping to a new page
Might be I understand in-correctly?
|
|
|
|
|
For this to work you would use your script to save whatever picture you wanted as "a.jpg". adding the time after the filename ensures you do not end up with a cached version of the image.
Fix:
This line:
img.src = "a.jpg"+ foo.getTime();
should be:
img.src = "a.jpg?"+ foo.getTime();
|
|
|
|
|
Sorry about my understanding, as I mentioned before ... I don't know which picture to place as you mentioned! I must somehow knowing the web-user select the new one in the SELECT tag to replace new picture on right-side at the same place (please see my original codes)!
And I still don't have the way to acknowledge the change of the SELECT tag within the same page, by any chance you modify my codes & it works as you mention?
Many thanks for be patient with me
|
|
|
|
|
Ah.
Javascript to get selected index of a select tag:
<script>
var dropdown = document.getElementById("mySelectElement");
var index = dropdown.selectedIndex;
if (index == 0){
alert("a");
} else if (index == 1){
alert("b");
}
</script>
Then in your html:
<select id="mySelectElement">
<option>a</option>
<option>b</option>
</select>
|
|
|
|
|
Hi Marc,
Thanks for the codes, I am able to get the SELECT tag now & I will try to replace the old picture with the new picture as other suggestions
|
|
|
|
|
I have made a Silverlight application which use a WCF webservice. I works fine but there is a small problem.
The background:
I run a gameserver and the game saves a resultfile which is updated in an interval (can be set).
I have a webpage with a Silverlight app. The SL app uses webservice to update some data on the client, with an automatic update every 20 seconds or so. Also works fine.
The Webservice parse the file from the game and that's no problem.
But I realize that if, let's say, 50 ppl go to the page and just watch the SL app update, the webservice parses the file 50 times every 20 seconds! Not good...
Here is how I want it to go:
The client calls the webservice and gets the already parsed file as data. And the parsing/reading the file will update in the background and store the data to be ready for transfer to the client.
But how do I make my webservice parse the file without the client calling the service?
I actually don't know how to pass this problem... not an webservice expert either
Any tips and was I clear enough?
|
|
|
|
|
We have a similar issue where we have a large block of data that displays on a dashboard. It can be accessed by 1..N clients and involves some complex queries and therefore we don't want to be re-running it each time the request is made.
The solution is to cache on the server side.
There are several ways to tackle this. I would start by abstracting your service with an interface (should be doing this already) and then having the interface also receive a cache interface, ICache.
You can make it simple, for example, perhaps you construct it with a factory like this:
ICache cache = CacheFactory.RetrieveCache(TimeSpan lifespan);
This gives you flexibility for how long it is cached.
Then, you might use the ASP.NET Web Cache - take a look here for some exhaustive examples/solutions:
Exploring Caching in ASP.NET[^]
Another option is to use the Singleton pattern and create a static class with a "lastcached" date and the parsed file.
Basically, you expose a method "getparsedfile" and the method checks the lastcached. If it was cached less than you interval, it will simply return the cached object, otherwise it locks the object, updates the date and then re-parses the file.
Hope that makes sense!
|
|
|
|
|
hi all
I have create a virtual directory under IIS6 and windows server 2003
now my environment is like
my server(where IIS is configured) is under MAIN Domain
and
when I try to use the site from client machine(win XP) it will promp me for passowrd authentication
what should i do ???
should i give impersonation to my virtual directory
if YES then which User should i put in impersonation
Domain user or application server user
what to do ????
thankx in advance
If the message is useful for U then please Rate This message...
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
Do you even need domain authentication enabled? If your site doesn't do anything with domain usernames or passwords, simply disable Windows Authentication on the virtual directory.
Adam Maras | Software Developer
Microsoft Certified Professional Developer
|
|
|
|
|
In your IIS, right click the Virtual Directory --> Properties --> Directory Security --> Click on Edit button in the section Authentication and Access Control --> Check the Enable Anonymous Access checkbox,
Deselect Integrated Windows Authentication.
This should solve the issue. Hope you have not set any Windows Authentication code in your web application. Else you need to look into that as well.
|
|
|
|
|
What is the @ Blocks for in the CSS document outline within Visual Studio (2008)?
Todd Smith
|
|
|
|
|
how to fetch historical data from nseindia.com and write in a .txt file ? example:-http://nseindia.com to http://lala.com/yaka.txt
|
|
|
|
|
You can't, obviously. Not unless they offer such a service through a webservice.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi everyone,
This is a brief question which Im sure has an easy answer, but one that I cant see!
I have a .png page overlay in the lightbox style that I want to display when a user carries out various actions. The problem I am having is that although it covers the entire page on my monitor (a 1440 x 900 resolution) when I view it on a different resolution (say 1024 x 768) it no longer stretches to the full length. It appears that although the .png image is repeated 100% vertically and 100% horizontally that it only covers the viewable area. Anything below this that requires scrolling to get to is not covered by the overlay.
Does anyone have any thoughts on why this might be happening and what I can do to fix it?
Cheers, Bryant
|
|
|
|
|
Unless someone has a better suggestion (pure CSS) I have resolved this by using JS to obtain the window height and width (and max scroll areas) and then dynamically setting the overlay height and width with these values.
|
|
|
|
|
Hi,
I am developing AJAX supported web application. Previously I had .Net Framework 2.0 with Visual Studio 2005 and for that I installed ASP .Net 2.0 AJAX Extension to use AJAX controls in application. At that time it was worked properly.
But now I have upgraded my Framework to .Net Framework 3.5 with Visual Studio 2005, I have uninstalled previously installed AJAX Extension. And want to use the AJAX controls provided by .Net Framework 3.5, so I added these controls to Toolbox. But unfortunately when I am going to use these controls it is still referencing to the previous version. I checked in web.config for assembly version, but it is referencing to the previous version.
Afterall I am not able to use these AJAX controls provided by .Net framework 3.5.
Anybody have solution on this problem.
Pravin
|
|
|
|
|
You can go to www.allegianceauto.com/termsbarry/ and you will see that there is a "<" at the top. Now if you go into the source code, there is nothing there. But wait... if you just go into firefox and actually highlight it and select view se;ection source, then you will see something that for whatever reason isn't there when just looking at the. There is a & lt there. I have separated the & and lt sections so it won't print it out. I emphasize that this isn't there when you go to look at the source code the normal way. Matter of fact this is the only way I have been able to find anything. I have put the whole html code as it sits on the server in a text file at http://allegianceauto.com/termsbarry/test.txt[^]. If someone could at least put me in the right direction, this would be immensely appreciated.
|
|
|
|
|
what about
<form id="form1" name="form1" method="post" action="/terms2/">
<<table ...
Remove the < before <table tag.
|
|
|
|
|
yes but as I said before if you go to the actual code on the server, you will see that this code doesn't exist. Go to http:[^] and you will see the code. For whatever reason it's not in the code but it somehow appears in the source. It's not php related because I have converted it to html and removed the one line of php code and it still occurs. I also have disconnected my internet to make sure that it's not something from another page. So it can't be related to php and it has to be in that code somewhere. I can't find it though.
|
|
|
|
|
Search for this line....
<td width="258"> <input name="txtDate" type="text" id="txtDate" readonly="readonly" width="20" value ="<?php print date('D, d M Y H:i:s T');?>"/>
It has an additional < at the front of it.
|
|
|
|
|
Hai All,
Is there any role based security(authentication) framework for jsp web development.Means that depending on the Role(eg:manager,employee,other..etc) we restrict the pages to the user.To implement such project we need to customize each time depending on the nature of project requirement.If a framework exist it may be useful.Your responses are valuable than answers.
Regards
Sanuji
|
|
|
|
|
I need directions on how to properly create a tool bar where people who visit my website can post comments and I can give feed back. I guess I need some type of code of what not. Basically blogging back and fourth instead of me just being able to post. Thanks
Any help is huge!
|
|
|
|
|
Well, it's kind of impossible to answer this.
1 - are you a programmer, or are you using some sort of online site template ?
2 - what is the site written in ?
3 - how does a toolbar allow you to post comments ?
4 - does your website already have a database ?
That would give us a start.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I want to write a web application (application A) containing XML file .
This web application will be invoked from an HTTP request (from another application - application B) .
Application A should then send the XML file to Application B and return back to Application A with returned data .
My first task is how do I create the XML - But I'm not sure how I go about doing it ???
using ASP.net???
|
|
|
|