|
Hi all,
I am new to JavaScript. i am making a page which shoud have a div floating. i changed the position to fixed which solved it but now i want to change the position to the absolute on condition that when the scrolling div comes to a certain area i can change it is that consider the code
<div id="container" >
<DIV id="formButtons"><asp:Button id="Button1" onclick="Button1_Click" runat="server" BackColor="Aqua" Width="201px" Text="Save Form"></asp:Button> </DIV></div>
the div container is the parent div with height 500px and div formButtons is the scrolling div
i want scroling div to move in the parent div is that if i scroll to the bottom the scrolling div should stick on the bottom of the container div
the javascript i used for this is as follows it works but the problem is i am using constant values it will work if the window is of specific size is there any way to get the end position of the parent div
window.onscroll = function()
{
if (document.documentElement.scrollTop < "530") //the value i have putten in quatation is the constant where i need a certain function to dynamicaly get the values the value entered here is one where i want div to stick but it changes when maximized
{
document.getElementById("formButtons").style.position= 'fixed';
document.getElementById("formButtons").style.bottom= '0px';
document.getElementById("formButtons").style.right= '0px';
}
else
{
document.getElementById("formButtons").style.position='absolute';
document.getElementById("formButtons").style.right='0px';
document.getElementById("formButtons").style.bottom="'-690px'"; the value here should also be assigned dynamically on parent container bottom right
}
}
what should i do please Help?
|
|
|
|
|
I want to record voice/text chat of my website users who communicate through Skype. Can anybody help me how can I accomplish this task using ASP.NET or PHP code?
|
|
|
|
|
M.Daud wrote: Can anybody help me how can I accomplish this task
I realize this is not popular these days but if it were me, I might start by introducing myself to some technical information about Skype.
Ok, I just did that, and having done so, it is possible that your question makes no sense, however you might want perform your own in-depth analysis.
led mike
|
|
|
|
|
led mike wrote: I realize this is not popular these days but if it were me, I might start by introducing myself to some technical information about Skype.
The most simply obvious step.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Paul Conrad wrote: The most simply obvious step.
Yeah. It's beyond my understanding how so many people think they can read something from a forum that will be, somehow, magically more informative than reading information that already exists on a subject.
led mike
|
|
|
|
|
led mike wrote: It's beyond my understanding how so many people think they can read something from a forum that will be, somehow, magically more informative than reading information that already exists on a subject.
I agree. When looking at most knowledge base articles on just about any real topic, the length of those articles would just be beyond the scope of a forum post. I wonder if it is people hoping for a quick silver-bullet, cure-all, answer; rather than having to do some serious reading.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Paul Conrad wrote: I wonder if it is people hoping for a quick silver-bullet, cure-all, answer;
At least sometimes no doubt. Another possibility is if their origins are Drag and Drop they just may not have a clue about anything. Therefore everything must be solved by having a set of directions. Connect part A to Part C using Part B. What do they do, who cares, just follow the directions and ship it. If it works do it.[^]
led mike
|
|
|
|
|
led mike wrote: If it works do it.[^]
Nice one
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
hmmm...I record with SkypeCap, are you try this??
|
|
|
|
|
Hi,
I'm getting an error when i am calling the click event of asp button through javascript.
Error :
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Text property cannot be set. String was not recognized as a valid DateTime.
I am not getting the cause of the error.
Pls help me in this matter.
|
|
|
|
|
You are setting a string that is not a date to a "Text" property of a control that expects a date string.
|
|
|
|
|
Thanks for your answer.
But i am not setting any string to any control that expects a date string.
I am just calling click event of asp button from javascript for e.g.
document.getElementById("asp:button").click();
I have set a debug point on the click event of the button on aspx.vb file.
While debugging before going to the click event of the button i.e. debug point, I am getting mentioned Exception.
Pls tell me what to do?
|
|
|
|
|
Can you provide me :
1. The html code for the button
2. The javascript function that is called.
3. The javascript function call.
4. The button event code.
Thanks
|
|
|
|
|
Hi
I am using Web Methods and Stateful Classes for DML Operations i.e. (Insert, Update and Delete).
Now i want to populate/bind my control from the saved data.
I am gettting the datatable from the ajax method and can access it through javascript. I have binded controls synchronously with the values returned through datatable.
I want to bind data asynchronously, for that I want to convert datatable into JSON String and return that to javascript.
Pls help to for the same.
|
|
|
|
|
How do you return the data to Javascript ? is it in XML format ? now I think you will have two approaches: First convert the datatable to XML and then to JSON in the code behind and send the JSON presentation back to javascript then bind, the second approach is to convert the datatabe to XML in code behind and then send the XML presentation to Javascript, in Javascript you convert the XML to JSON and then bind.
In both approaches the hard part is to convert the XML to JSON either in Javascript or code behind, there are a lot of articles on this subject ... try to search on that and pick the one that suits you.
Sincerely Samer Abu Rabie
Note: Please remember to rate this post to help others whom reading it.
|
|
|
|
|
You have to loop through the rows to format the data to JSON string.
Let's consider an example that your datatable contains two columns:
- FirstName
- LastName
then, the code might be:
Note: - Am not giving the exact code
protected function ConvertDataTableToJSON(byval dt as DataTable)
Dim strJSON as string
strJSON = "{"
for each row as DataRow in dt.Rows
strJSON = strJSON + "'firstName':" + "'" + row("FirstName") + "',"
strJSON = strJSON + "'lastName':" + "'" + row("LastName") + "',"
end for
strJSON = strJSON + "}"
return strJSON
end function
Hope this will be useful. Please refer the following link for JSON format:
http://en.wikipedia.org/wiki/JSON[^]
Thanks,
Rajdev KR
|
|
|
|
|
I have a gridview which i have to bind through javascript.
I am getting the datatable from the server side to client side by using ajax method.
I want to bind the returned datatable to the grid view through javascript.
Please help me on the same.
|
|
|
|
|
I already replied in your previous post Hope that one helps.
Sincerely Samer Abu Rabie
Note: Please remember to rate this post to help others whom reading it.
|
|
|
|
|
I have a form text area on a webpage here http://run-mapper-kml.appspot.com/ that I want to send text data directly to.
The data is coming from an external source which is in a MS Access database and is sent live (eg: no physical file). I don’t want to send the data just to the url; I actually want it to populate the text area on the form, whereupon the user presses the command button to action the form’s contents.
I just want help on how to reference the actual text area on the form (everything else is taken care of). Can this be done?
PS: I am not an experienced web programmer or coder in any sense, but am willing to learn how to do this. I’m not even sure if I have posted this in the appropriate forum (mods feel free to move this post elsewhere)
This is my form on the webpage.
[code]
<form action="/" method="post" name="kml_Form">
<textarea cols="40" id="id_kml" name="kml" rows="20">{{ kml_data.kml }}</textarea>
<input name="key" value="{{ key }}" type="hidden" />
<input id="lat" name="lat" type="hidden" value="{{ lat }}" />
<input id="long" name="long" type="hidden" value="{{ long }}" />
<input id="zoom_level" name="zoom_level" type="hidden" value="{{ zoom_level }}" />
<input name="commit" type="submit" value="Show it on the map!" />
</form>
[/code]
|
|
|
|
|
Best way to do this is through ASP.NET. Any code done is ASP.NET will generate the necessary html response that the web browser will render.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Paul,
I don't know anything about ASP or any other web coding. I don't want to send the data to the url itself, but want it to drop straight into the form on the webpage. here's a link to my webpage to give you some idea of what I mean.
http://run-mapper-kml.appspot.com/
|
|
|
|
|
Your "Show it on the map!" button will need to have some server side code if you are taking data, working off an Access database, and posts back. Without any server side coding in ASP/ASP.NET, you really cannot do any kind of database access without it. Security is one of the reasons as well. You do not want a database's connection string or anything sensitive being exposed in the html.
Conceptually is it not difficult to have the button send data to be queried against the database and the results placed on the map to the right. If having the data being in the url is an issue, you could always use session variables to pass the data to be queried to the database.
You could always try to work it through javascript, but that exposes maybe a bit too much about your database on the client side.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Paul,
I think I have not explained myself very well, and this is coming across as much more complex than it needs to be. Try not to think of this all happening on the server side or from the web page at all, because it will in fact happen from the database side with a one-way communication involved. I don't need synchranous dialogue with the webpage - database, nor do I need open connections to and from the database, nor does the buttton need to do anything other than what it already does. Everything is already in place, take a look here http://run-mapper-kml.appspot.com/.
Think of it like this instead; ordinarily the user would simply paste the kml text into the form text area and push the button. The bit I want to do is to get rid of the pasting bit and send the text straight to the box. Now look at this:
stAppName = "C:\Program Files\Internet Explorer\iexplore.exe http://maps.google.co.uk/maps?f=q&hl=en&q=" & MyData
it is code (which works) from the database to simply call the url for googlemaps and send it some data, which will drop straight into the googlemaps search box, ready for a button to be pressed. As you can see their is no querying involved, there is no database access involved at all. Because all of this will happen from the other end, namely the database fron end, and not the web page.
I want to replace the code element above maps?f=q&hl=en&q=" with something that would work on my webpage. In other words I just want to know how to reference the actual form text area so that my code will look more like this:
stAppName = "C:\Program Files\Internet Explorer\iexplore.exe http://run-mapper-kml.appspot.com/code to link to the form & MyData
Does that make sense?
|
|
|
|
|
efandango wrote: Does that make sense?
Yes, it does make sense, but from what I've read/researched for your problem, it sounds like it cannot be done other than the way you have that does work.
http://maps.google.co.uk/maps?f=q&hl=en&q= does involve server side scripting to be done and there are reasons for that.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Paul,
Yes, I agree with you that the way googlemaps do their's would involve server side scripting in order to return a result (map); but bearing in mind that their's is also going to interrorgate the server for a map result.
But, where my version differs is that the 'Paste KML here' box in conjunction with the button has already got that covered. What I am trying to do is dend my data to the live form (instead of a user having to cut and paste it in), not neccesarily to the server itself where I may be expecting an instant return/result on what was sent.
Imagine for a moment that I didn't want to send anything sensible to the server side, instead consider that I just want to send some 'junk' text to a text area on a form, because essentialy speaking that is all I want to do, eg: send junk text. It is only when it is in the form and the crucial button is pressed that the junk text actually means something. So How would one send just text to a form on a webpage? (not specifically to the url)?
|
|
|
|