|
Connection string and Getting data from database in .js file. So its not visible.
|
|
|
|
|
Js files can be downloadable by normal users even don't need hackers. It's totally a wrong way, use AJAX as J4amieC said.
|
|
|
|
|
SatyaKeerthi15 wrote: So its not visible.
says who?
|
|
|
|
|
Hello all,
I'm really keen on the kind of "overview menu" (for lack of a better description) which you can find for example at www.raytheon.com - the one with the big red buttons. Does anyone know if somelike this is available from somewhere? I haven't myself been succesful in my search. I could develop it but surely there must have been someone before me.
Many thanks,
Morten
|
|
|
|
|
There is nothing special about it, some li elements with styles.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
For those who may benefit,
I discovered the jcarosel jquery plugin, which is great for building menues such as the one I was searching for.
/M
|
|
|
|
|
Experts,
I have a problem which i need help with, I have a javascript page which will detect the users browser, if it is below a certain defined state another webpage will be displayed saying. Unfortunatly your web browser is not up to date.
This has all been done however how do i link pages through javascript?
i thought this would work however it doesn't
document.write("<href='oops.html'>");
I have also tried closing the javascript and opening a html tag (would look something like this)
</script>
<a href="../MWHAHA website/oops.html"></a>
<script type="text/javascript">
all i would like to do is open a html page if a statement is true or not.
If anybody can help that would be great
Cheers
Dan
|
|
|
|
|
location.replace('oops.html');
But,
your scheme seems wrong.
Exactly which browsers will you
disallow, and for what reason?
|
|
|
|
|
Hi thanks for your reply!
I will be disallowing browsers such as internet explorer which is < version 6 as my website will not function correctly in it.
I tried the location.replace('oops.html') but nothing happened.
The code i need something simular to this
if interent explorer <6 then
open url opps.html
else
do nothing
In the javascript i cannot get the url to load the page.
Thanks
|
|
|
|
|
putting this in head will
redirect IE browsers less than 6
(google 'conditional comments')
Commonly, the necessary features are
checked and the page redirected if they
are present leaving browsers which do not
have desired features at current page,
the current page will explain the problem to the user.
Users with appropriate browsers will not see the current
page because they will have been redirected.
(google 'javascript feature testing')
Also, if a necessary feature is missing from browser
there is always a javascript work-around that will
compensate, unless of course it's javascript thats missing.
In that case it will not redirect!
So leaving that browser on current page is good option.
|
|
|
|
|
location.href = 'newpage.html';
|
|
|
|
|
NeverHeardOfMe wrote: location.href = 'newpage.html';
The difference between location.href and location.replace is that location.href creates a new history entry on the visitor's browser
while location.replace replaces the history entry. If the history
entry is not replaced the back button will lead to the redirect
page again causing 'redirection loop' which is usually undesirable and may have unwanted side effects.
|
|
|
|
|
TIL... to RTFM properly! I stand corrected...
|
|
|
|
|
Hello all,
I have used the countdown timer in my asp.net project . It does working fine but the problem arises when I press f5 key or refresh in anyway..timer initialses again to maxmimum set time...
So I need a solution for countdown timer that must not be affected on refreshing the page...
Please help..........
thanks in advance
Amit Jain
|
|
|
|
|
Well, one answer is 'use frameset with timer in a frame
that doesn't get refreshed'.
|
|
|
|
|
Thanks for your reply bro..
But it doesn't work
When I refresh the whole page ...frameset automatically refreshes and time again intialises to the given time (say 10 min) and starts counting down..
Any alternative to this ??
|
|
|
|
|
blockquote class="FQ"> vinci007 wrote: Any alternative to this ??
Yes, store the start time in a cookie.
here is a very simple example
<!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>
<title>My Timer Page</title>
</head>
<body>
here is a timer that will keep count<br /> even if page is refreshed<br />press button to reset<br />
<div id="timerDisplay"></div>
<div><input type="button" onclick="myTimer.reSet()" /></div>
</body>
<script type="text/jscript">
var myTimer = (function () {
var readCookie = function () {
var ca = document.cookie.split(';');
for (var i = ca.length; i--; ) {
var c = ca[i].split('name=');
if (c.length == 2) return c[1];
};
return 0;
};
if (!readCookie()) {
document.cookie = "name=" + (new Date().getTime()) + "; path=/";
};
var stuff = {};
stuff.howLong = function () {
return new Date().getTime() - readCookie()
};
stuff.reSet = function () {
document.cookie = "name=" + (new Date().getTime()) + "; path=/";
};
return stuff;
})();
setInterval("document.getElementById('timerDisplay').innerHTML = myTimer.howLong();", 500);
</script>
</html>
modified on Wednesday, August 25, 2010 9:45 PM
|
|
|
|
|
I am using querystring to execute the notepad data.
notepad contains follwing:
mailto:shail?CC=shail&Subject=test&Body=qtsts
I dont want to use window.open script in notepad file to open the prepopulated outlook window, is there anyway we can open the outlook window using above 'mailto:' data. Below is url as example
http:example.com?name=http:teamspace/sites/notepadefile.txt
below is my script
<script>
function PageQuery(q) {
if(q.length > 1) this.q = q.substring(1, q.length);
else this.q = null;
this.keyValuePairs = new Array();
if(q) {
for(var i=0; i < this.q.split("&").length; i++) {
this.keyValuePairs[i] = this.q.split("&")[i];
}
}
this.getKeyValuePairs = function() { return this.keyValuePairs; }
this.getValue = function(s) {
for(var j=0; j < this.keyValuePairs.length; j++) {
if(this.keyValuePairs[j].split("=")[0] == s)
return this.keyValuePairs[j].split("=")[1];
}
return false;
}
this.getParameters = function() {
var a = new Array(this.getLength());
for(var j=0; j < this.keyValuePairs.length; j++) {
a[j] = this.keyValuePairs[j].split("=")[0];
}
return a;
}
this.getLength = function() { return this.keyValuePairs.length; }
}
function queryString(key){
var page = new PageQuery(window.location.search);
return unescape(page.getValue(key));
}
function displayItem(key){
if(queryString(key)=='false')
{
document.write("you didn't enter a ?name=value querystring item.");
}else{
document.write(queryString(key));
}
}
</script>
modified on Thursday, August 12, 2010 8:38 AM
|
|
|
|
|
shailrathore wrote:
I am using querystring to read the notepad data.
notepad contains follwing
mailto:shail?CC=shail&Subject=test&Body=qtsts
What does it means? You are reading nodepad data in querystring??
shailrathore wrote:
I dont want to use window.open script in notepade file, is there anyway we can open the outlook window
using above 'mailto:' data. at the moment it only write the data.
http:example.com?name=http:teamspace/sites/notepadefile.txt
below is my script
Your question is not clear.
If I understand correctly that you wants to read the data from a text file and prepare the mail body, subject etc and send the email. Is it right?
|
|
|
|
|
Yes Prosanta you are right. At the moment I am using below script in notepad
window.open('mailto:shail?CC=shail&Subject=test&Body=qtsts
')
and i dont what to use this script.
Please help
Shail
|
|
|
|
|
Hi All,
Can anyone please let me know how we can find all open browsers with the help of Javascript? Please help.
Thanks a lot.
Thanks,
Rajinder
|
|
|
|
|
You cannot find all the open browsers using javascript. You can use Navigator object for getting information about vistor's browser. Check this [http://www.w3schools.com/js/js_browser.asp].
Provide more information about your requirement.
|
|
|
|
|
Hi,
Thanks for our reply.
My requirement is to close all the open pop-up windows when user click log-out or close the application parent window. The problem is that I can not change all the pages of application 'coz if I change all the pages of my application then I have to change around 1000 pages. I am trying to findout some solution which I can apply on the logout link or onunload of main window, to close all the opened pop-ups.
As we can find out the URL of browsers with "document.location.href", so I was thinking that if there is any way to find out all the open browsers and then get the URL of all the open browsers and then close all the browser whose URL starts with my domian name (let say kamboj.com).
Please help me to find out solution for this.
Thanks,
RK..
|
|
|
|
|
Are you using window.open in the same way every time? Are you using .js files? If you have a site with 1000 pages and didn't use something like includes, master pages or some other templating mechanism you need to go slam your hand in a door and with your broken fingers write out "I will think about maintainability" a million times.
|
|
|
|
|
Hi Gray,
We have 1000 pages and we are using .JS files and some include files as well, So I guess I do not need to slam my hand in door and do not need to write with broken finger...
SO do you have any soluation for this now?
|
|
|
|