|
Very interesting, but that question was posted nearly eight years ago. It is most unlikely that the poster is still working on the same issues. Focusing on current questions is a better idea.
|
|
|
|
|
ok I have an assignment to make a page with an object moving diagonally and another one moving vertically. I have no problem getting the object move horizontal but am having a problem with the diagonal and vertical. Can anyone help me with the code? This is what I have for the horizontal:
body {
background-color: #093;
}
#apDiv1 {
position:absolute;
width:200px;
height:115px;
z-index:3;
left: 9px;
top: 317px;
}
#apDiv2 {
position:absolute;
width:200px;
height:115px;
z-index:3;
left: 3px;
top: 333px;
}
it works great for moving the horse across...but I'm in need of different directions.
thanks for any help y'all can give...
|
|
|
|
|
crzybug wrote: document.getElementById("Ride").style.left=265+(row*12); If that moves it horizontally, then
document.getElementById("Ride").style.top = something will move it vertically. Diagonal is just a bit of each.
Overall, I'm not sure that your approach would be my choice, but if you've got this far, then keep going by all means.
Peter
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
|
Good Evening All
I have a small issue here. I have a Div inside a TD that is defined like this
<td >
<div id="divGoogleEarthMap" runat="server" [B]style="display:none" [/B]
>
<asp:HiddenField ID="HiddenField1" runat="server" />
<asp:ImageButton ID="GoogleEarthMap" runat="server" Height="100px"
OnClientClick="javascript:showimage('GoogleEarthMap'); return false;"
Width="100px" />
</div>
</td>
now the display style of this div is hidden. so i have a Javascript that runs when i close my popup. the first thing that javascript does is to populate two textboxes and show this div. It populate the textboxes nicely , but it fails to show or unhide the div. i have tried to set of code example using the normal javascript and also JQuery as depicted below
$('#divGoogleEarthMap').css('display', "block;");
and
var div = document.getElementById("divGoogleEarthMap");
div.style.display = "block";
or
document.getElementById('divGoogleEarthMap').style.display = 'block';
but still my Element cant be displayed.
Please note that i have a Sample Project that i can be supplied on request
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com
|
|
|
|
|
Hmmmm. It does seem a bit strange.
Are you able to see other content in the table? I'm wondering if there's something else keeping it hidden. I.e if the table was display:none then the div will never show.
This code works for me in Chrome 19 and IE7
<html>
<head>
<script>
function byId(e) {return document.getElementById(e);}
function unhide(elementId)
{
var tgt = byId(elementId);
tgt.style.display = 'block';
}
function hide(elementId)
{
var tgt = byId(elementId);
tgt.style.display = 'none';
}
function onShowBtn()
{
unhide("myHidden");
hide("showBtnDiv");
unhide("hideBtnDiv");
}
function onHideBtn()
{
hide("myHidden");
unhide("showBtnDiv");
hide("hideBtnDiv");
}
</script>
</head>
<body>
<table>
<tr>
<td> Hidden -> </td>
<td>
<div id="myHidden" style="display:none">
random random random<br/>
</div>
</td>
</tr>
<tr>
<td>
<div id="showBtnDiv">
<input type="button" onclick="onShowBtn();" value="Show"/>
</div>
</td>
<td>
<div id="hideBtnDiv" style="display:none;">
<input type="button" onclick="onHideBtn();" value="Hide"/>
</div>
</td>
</tr>
</body>
</html>
|
|
|
|
|
Thank you , the following has worked for me.
document.getElementById("<%=divGoogleEarthMap.ClientID%>").style.display = 'block';
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com
|
|
|
|
|
You're welcome.
|
|
|
|
|
Hi all;
I've read "A Complete ActiveX Web Control Tutorial" article at here:
A Complete ActiveX Web Control Tutorial
I've done the all steps to create my own activex using MFC (C++).
I'm not familiar with java scripting!
When I run the downloaded "myactivex" project html files, everything is OK.
But when I create another html file exactly same as the downloaded project and use my own activex which is currently similar to the "myactivex.ocx", I don't see any event received by html code (java script)!
I mean, when pushing "submit" button, the other page containing "The parameter you entered is:" message is not displayed!!
I think the html code doesn't get any event (ParameterLoaded) from activex!
Because I've not worked with java script, I can't find the problem reason!
Or the problem is from activex or a specific setting miss in system... I don't know?!!
Please help me about this problem...
I don't think to be able to get the response on that article thread.
Thanks in Advance.
|
|
|
|
|
#There was no python sub-category forum, so posted this here.
---------------------
Hey mates,
on ubuntu-linux. I need/want to code a python applicaton that does the following:
takes the 'date-modified' of the file (almost always a .jpg jpeg) and adds a 8 digit format string to the beginning of it.
I have manually using pyrenamer to rename them. When I have many files all on the same date. this works, but but but, when I have many files on different dates this is tedious.
the format string would be:
EXAMPLE;
file modified on 2012-17-Mar
change name to 20120317_num
where num is just a two digit numbe 01,02,...
Any ideas on how I would start to code such an app.
It is a relatively simple process but I fear it will be complex to code and outside of my skill-level and will need to research a lot of things like
how to get the date-modified information
manipulating/changing the string of 2012-17-Mar I could see a lot of if-elses for the 12 months and whatnot.
Relatively simple concept; currently outside of my abilities as a coder, but this would be great to code.
If anyone has any resources on how to do this, would be rewarding for me to code, would be freakishly useful, and would safe time. thanks!
pyrenamer is super bulk-file-renamer (the best i've seen across mac, windows, and linux OSes) but that specific usage where it takes the file format etc is complex.
I guess I would rather find such an app (to process files) AND THEN code a separate one for the reward of coding.
Recently i've been making folders of month and then subfolders of day and putting corresponding date-modified files in the month/day folder and then using pyrenamer.
again, tedious when have many 'different days' of date-modified.
|
|
|
|
|
I did something similar with BASH a while ago, to rename files according to their modification date:
saveIFS="$IFS"; IFS=$'\0'; while read -a line; do mv "${line[1]}" "${line[0]%.*}.${line[1]}"; done < <(find -maxdepth 1 -type f -printf "%T+\0%f\n"); IFS="$saveIFS"
Hope it helps!
|
|
|
|
|
Anybody know of any good JavaScript libraries that provide spider plots (sometimes called radar or polar plot)?
I've used flot and found a flot plugin, but as you can see here[^], it's not quite complete. The labels are messed up. Somebody had posted a fix for the labels, but it then breaks the highlighting!
The ideal situation would be an interactive, editable spider plot where you can drag values up and down the "legs" of the plot. The author of the flot plugin had alluded in November to a new version with support for that, but I don't know if he's still working on it, or if it's abandoned.
|
|
|
|
|
I was built "Image gallery" application ...First,I need to know how to build a function that put one of these images as wallpaper on the desktop ... I think I need to change the registry file for the system ... right! . Second, If this is right any conflict with the antivirus programs?
Thank you
|
|
|
|
|
Weli05 wrote: how to build a function that put one of these images as wallpaper on the desktop
I don't believe that you can do this with javascript.
- Chrome doesn't allow this via the right-click menu.
- Internet Explorer does
- Opera does
- FireFox does
In each of these 3 instances, it's native-code in the browser which adds this functionality.
Weli05 wrote: I think I need to change the registry file for the system ... right! . Second, If this is right any conflict with the antivirus programs?
Yes indeed. You can do it with Reg Keys. Depending on which user is targeted, the exact key varies.
No, I don't believe there to be a problem with virus-scanners and these keys. (though they may not like code that gets other user's SIDs)
If you want to change them for the currently logged-in user, you can find the keys here:
HKCU\Control Panel\Desktop
->TileWallpaper
->Wallpaper
->WallPaperOriginX
->WallpaperOriginY
->WallpaperStyle
If you wish to change them for another user (eg, you log in as Admin and want to change the wallpaper for a user's account)
1. Get the user's SID - userSid
2. The keys are found here:
HKU\userSid\Control Panel\Desktop
Further Reading
Change wallpaper through registry[^]
|
|
|
|
|
Thank you "enhzflep" for your replay and the information
what I meant is to include a code with my software "Image Gallery" to change the wallpaper from inside the application.
and if it is not possible in javaScript can we do it in c# for example
Thanks
|
|
|
|
|
No worries.
Sure. There's a couple of approaches. None of which use javascript as a complete solution, since (a) javascript can't modify the registry and (b) Javascript can't write a .reg file, finally (c) I don't remember if we can get the full path of a files saved from the browser with javascript.
1) Set the Registry Keys directly (you can do this with c#)
2) Create a text file (a reg file) that contains text that when Imported with RegEdit will create/modify the required key(s).
An example of #2 may be:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Control Panel\Desktop]
"WallpaperOriginX"=dword:00000000
"WallpaperOriginY"=dword:00000000
"WallpaperStyle"="10"
"Wallpaper"="C:\\Users\\enhzflep\\AppData\\Roaming\\Microsoft\\Windows\\Themes\\TranscodedWallpaper.jpg"
And, since I've nothing better to do just now, here's a webpage that will generate data that you can copy and paste into a text-file. You can then save that file with a .reg extension. Once done, you can double-click the file to have it's contents added to or modified in the registry.
Notes- I only set a wallpaper to stretch-mode
- I expect the path to have double backslashes in it already
- If constructing the string in something other than a browser, you'll want to replace those <br> tags with "\n" - since the browser displays <br> as a newline.
<html>
<head>
<script>
function byId(e)
{
return document.getElementById(e);
}
function makeRegFileData(imgFilePath)
{
var result;
result = "Windows Registry Editor Version 5.00" + "<br>";
result += "<br>";
result += "[HKEY_CURRENT_USER\\Control Panel\\Desktop]" + "<br>";
result += "\"WallpaperStyle\"=\"" + 2 + "\"" + "<br>";
result += "\"Wallpaper\"=\"" + imgFilePath + "\"" + "<br>";
return result;
}
function processInput()
{
var path, regStr;
path = byId("sourceImage").value;
regStr = makeRegFileData(path);
byId("resultDiv").innerHTML = regStr;
}
</script>
<style>
#resultDiv
{
border: 1px solid black;
border-radius: 8px;
background-color: #EEE;
display: inline-block;
}
</style>
<title>genRegFileData</title>
</head>
<body>
Enter image filename: <input id="sourceImage" size="60"/>
<button onclick="processInput();">Generate</button><br>
<div id="resultDiv"></div>
</body>
</html>
|
|
|
|
|
Thank you ... very much appreciated
|
|
|
|
|
Hi!
I'm new to HTML 5. Where can I find a Tutorial to HTML 5?
|
|
|
|
|
|
|
Hi,
I wrote a script but I am not able to pass argument to the dialog box of my ssh-tectia.
<html>
<HEAD>
<TITLE>IPs</TITLE>
<link rel="stylesheet" href="style.css"/>
<script language="javascript">
<!--
var shell=new ActiveXObject("WScript.Shell");
function Execute(ipaddress,node) {
shell.Run("ssh-client-g3.exe /script /arg \" + ipaddress + \" /ARG \" + node + \" /ARG dinesh /ARG xxxxxx");
}
</script>
</HEAD>
<CENTER>
<FONT SIZE="+2">
IP's
</FONT>
</CENTER>
<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#3a15ff" ALINK="#ff0000" VLINK="#ff282d">
<div id="wrapper">
<TABLE cellpadding="0" cellspacing="0" border="0" bgcolor="ffffcc" class="sortable" id="sorter">
<TR>
<TH><FONT FACE="Helvetica,Verdana,Arial">DEVICETYPE:</FONT></TH>
<TH><FONT FACE="Helvetica,Verdana,Arial">IPADDRESS:</FONT></TH>
</TR>
<TR>
<TD><FONT FACE="Helvetica,Verdana,Arial">4</FONT></TD>
<TD><FONT FACE="Helvetica,Verdana,Arial">
<a href="Javascript:void(0);"OnClick="Execute('100.101.20.204','dinesh1')">100.101.20.204</a></FONT></TD>
</TR>
<TR>
<TD><FONT FACE="Helvetica,Verdana,Arial">4</FONT></TD>
<TD><FONT FACE="Helvetica,Verdana,Arial">
<a href="Javascript:void(0);"OnClick="Execute('100.101.20.205','dinesh2')">100.101.20.205</a></FONT></TD>
</TR>
</TABLE>
</div>
</body>
</html>
I want some help on how to pass the arguments like ipaddress/hostname, username to the tectia dialog box and also the password is prompted only after getting the hostname and username
how to pass this?
Any ideas or suggestions please let me know.
Thanks
Dinesh
|
|
|
|
|
We need a little bit more precision. The tool you are mentioning ssh-client-g3.exe is not mentioned in the documentation I found here: Tectia-Client-6.2-User.pdf
[^] and you also forgot to tell us which version you are using.
Another thing is that none of the command line tools on that Tectia site use /ARG to signifiy any parameters. All parameters I saw are of the typical kind that are started with a - followed by one or more characters. The way you are constructing your command string is also faulty:
var command = "ssh-client-g3.exe /script /arg \" + ipaddress + \" /ARG \" + node + \" /ARG dinesh /ARG xxxxxx";
would yield this true:
command == "ssh-client-g3.exe /script /arg \" + ipaddress + \" /ARG \" + node + \" /ARG dinesh /ARG xxxxxx
you probably meant to say this:
var command = "ssh-client-g3.exe /script /arg " + ipaddress + " /ARG " + node + " /ARG dinesh /ARG xxxxxx"
which would yield true for an IP of 192.168.0.1 and a node named ERLM5ZGA
command == "ssh-client-g3.exe /script /arg 192.168.0.1 /ARG ERLM5ZGA /ARG dinesh /ARG xxxxxx"
Anyhow until you tell us your version of Tectia - Client you are using and the exact name of the command line tool, we won't be able to help you.
Regards,
Manfred
"With sufficient thrust, pigs fly just fine."
Ross Callon, The Twelve Networking Truths, RFC1925
|
|
|
|
|
Hi Ross,
Sorry for missing out that.
I wrongly typed the command. ssh tectia does not use the arg. I will briefly describe what I am trying to do.
1. I have a html file, which has valid ip address entries
2. When I click on this ip address it should call the tectia with the username and password.
3. Basically I want to automate the process of logging in.
4. I saw in tectia that it does not accept arguments like securecrt etc., so any way you think I can automate this process.
Thanks for any help.
|
|
|
|
|
Hi,
I did made some progress by following the below procedure
1. instead of using the html file I just created a .bat file
@echo off
cls
set username=root
ssh-client-g3.exe -h %username%@net.aspac.nsroot.net
Dim WshShell, scomputername
Set WshShell = WScript.CreateObject("WScript.Shell")
Set oNetwork = WScript.CreateObject( "WScript.Network" )
WshShell.sleep 10
WshShell.Sendkeys "C2008" & chr(13)
It works but it stops in password prompt not sure how to pass password to the dialog box.
Thanks for any help
|
|
|
|
|
You still haven't supplied the details that I asked for in my first answer to your question.
Which version are you using and why isn't the documentation I pointed to you not mentioníng anything about a ssh-client-g3.exe command line tool?
Please review your documentation and give us the details I asked for.
Besides that: Trying it out in a batchfile first is a good approach. You can still try later starting it from your HTML page.
Regards,
Manfred
"With sufficient thrust, pigs fly just fine."
Ross Callon, The Twelve Networking Truths, RFC1925
|
|
|
|