|
|
You can either check the value on form validation and/or
handle the onChange event for the text box, and check for those characters.
________
John Y.
Developer
|
|
|
|
|
I need to perform the below function on my htm page load event:
1. When i call URL A which ends at .htm file;
2. This htm page should Call Url B ;
Should pass on the user name and password required for URL B: and read the response.
3. Read the response on the page.
If
{ can find the string "XYZABCD" on the page
then
Show "Available";
else
Show "Not Available"
|
|
|
|
|
Hi,
text inside of body of page --> use body.innerText
href of an location --> use location.href and location.replace(sURL)
onload event of document --> use document.onload=javascript_code
--------------------------------------------------
2 documents have different content.
To open a document inside of other document --> use window.open() and window.parent
---------------------------------------------------
for internet explorer
body object see http://msdn.microsoft.com/en-us/library/ms535205.aspx
location object see http://msdn.microsoft.com/en-us/library/ms535866.aspx
document object see http://msdn.microsoft.com/en-us/library/ms531073.aspx
window object see http://msdn.microsoft.com/en-us/library/ms535873.aspx
|
|
|
|
|
Good Morning...I have been using the name attribute (for years) to call an aspx page to load in an iFrame, and it's works perfectly. Unfortunately, it throws a warning that this is an outdated code method and should be replaced. I am sure this is an old story to most Java developers (I am not one), but old habits (especially one's that work perfectly) die hard. So, I decided to move forward and use a newer code call so my code would compile perfectly clean (error and message wise). The catch is that nothing that I have tried works. They all load the page, but none load the page in the frame. Obviously, there is a syntax issue that I am missing. Here is my latest attempt:
<%--Change Page Content in iFrame--%>
<script type="text/javascript">
var newPage = document.getElementById('iFrame');
function ChangePage(newPage) { iFrame.src = 'iHome.aspx' };
</script>
//Contents for menu 1 (Home)
var menu1 = new Array()
menu1[0] = '<a href="iHome.aspx" target="javascript:ChangePage(newPage)" onclick="javascript:ChangeLabel(home)">Home</a>'
So....all this to basically replace (target="f1"), where f1 was the name attribute of the frame (now deleted)...Go Figure. A slice of code here would be much appreciated. Thanks for your help...Pat
|
|
|
|
|
|
Hi,
Need to create a program using Javascript to read the binary file located in the PC(C or D drive) and copy the file contents to a variable in Java Script and send the file data to server. Can this be done without using Active X contols?
Am using 'file' input type in HTML 1.0 for getting the path of the file.
|
|
|
|
|
No, you cannot do that just using Javascript from a browser.
|
|
|
|
|
Hi,
Is there any other method to read without using Active X control?
Thanks
|
|
|
|
|
If all you want to do is get the file from the client to the server, the file input type will do it without any Javascript or ActiveX required.
If you want a bit more control over how it works, you could try something like SWFUpload[^] which uses a Flash movie to give you a progress bar, etc.
|
|
|
|
|
Hi,
Using file input type we can only browse the file, my requirement is
1)Browse the binary file
2)Read the contents of the file
3)store the file contents
4)send the stored file contents to server.
|
|
|
|
|
Using <input type="file"> , the contents of the file is loaded by the browser and sent to the server when you submit the form.
If you want to send the file without submitting the form, you will have to use Flash, or ActiveX, or something similar.
|
|
|
|
|
I was thinking it will only help to browse the path.
Will try. Thanks
|
|
|
|
|
Server side code is in CSP.
Upon using submit button, HttpMethod_Post is called.
In HttpMethod_Post function fopen will not work as path is in local PC and server is in the device
How to copy the data or send the data to server in the device??
Can you please provide code or link.
|
|
|
|
|
|
Hi,
How to get data when
When we use on the webpage we get the option to select the file to be read.
Upon submitting we get the data right but how to copy the recieved data or send to server??
The control goes to below code upon submitting.
if(request->getMethodType() == HttpMethod_Post)
{
}
|
|
|
|
|
Graham Breach wrote: No, you cannot do that just using Javascript from a browser.
Actually... You used to not be able to do it with a browser (was viewed as a security hole). However, with HTML5, browsers have started putting in functionality to trap the filestream when a user selects a file in the input box.
More details are here: http://www.html5rocks.com/en/tutorials/file/dndfiles/[^]
Personally, I still view it as a security problem because I remember all of the details from back in the day, but my opinions don't seem to be falling in line with the new generation of web folks. (yea, yea, get off my lawn and all that)
|
|
|
|
|
Interesting stuff - thanks for the link. I always thought the file upload support was a bit too limited to be honest.
As long as the user still has to choose which files the browser can access this looks like a big improvement.
|
|
|
|
|
I do welcome the drag and drop features (this is probably the most common request I used to have when doing web stuff).
However, I don't like the idea of implicitly agreeing to local file access by just selecting something in a file input field. Especially since Firefox forces you into the file dialog when you focus on the field, and you cannot delete the input field's contents after selecting a file.
|
|
|
|
|
Hi guys
Its my first in this community and I hope someone can help me on this one. I’m currently working on the personalization of the layout of SAP ERP Portal. This Portal Framework uses Iframes to display the current page and/or applications on the Current Page.
Here is a custom draw of a page
---- Custom Componentes Like Menus etc
----- Iframe (InnerPage) – Shows the Current Page
--------This Page can have embedded content and/or More Iframes with Applications
All the Iframes are on the same domain but I only have acess to the innerPage Code and not to the iframes that have the applications.
Now we want the innerpage to automatic resize to the current content. This is being a problem (even after using jQuery Plugins or Resize Scripts) because:
1) The Iframes that have the applications change content height using Ajax/DHTML (not triggering load event) and this resize scripts wont call the resize mechanism.
2) I don’t have access to the applications source
3) On some tests ive made using Scripts ( for example Auto Height Jquery, SSI Dynamic Drive …) some iframes display the same clientHeight and ScrollHeight Even if theres a scrollbar in the browser window.
If there’s anyone there that can help me solve this kind of situations it would be really helpful Thanks
modified on Thursday, September 15, 2011 4:55 PM
|
|
|
|
|
Hi,
iframe object see http://msdn.microsoft.com/en-us/library/ms535258.aspx
The iframe element functions as a document within a document, or like a floating frame.
The frames collection provides access to the contents of an iframe.
Use the frames collection to read or write to elements contained in an iframe.
Example
sColor = document.frames("sFrameName").document.body.style.backgroundColor;
frames collection see http://msdn.microsoft.com/en-us/library/ms537459.aspx
iframe supports ID and NAME attributes too.
|
|
|
|
|
We got the same problem, and our solution is:
1. Set the outer iframe's height to "0"
2. Create a timer to watch every 5 seconds, if the inner iframe's height is larger than an expected value, then set the outer iframe's height to INNER_HEIGHT+15px
3. Kill the timer.
It works, but results in some memory leaks in Internet Explorer.
|
|
|
|
|
How to add a Second Parameter
<%# Eval("Patameter1","return showComment(""{0}"")") %>
please note that the "showComment" is a Jquery function
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@dotnetfunda.com
http://www.Dotnetfunda.com
|
|
|
|
|
You can using String.Format directly in the binding:
<%# String.Format("return showComment(""{0}"",""{1}"")", "Patameter1", "Parameter2") %>
|
|
|
|
|
hi Mat here is my code with your advice
<asp:ImageButton ID="btnComment" runat="server"
ImageUrl="~/Imgs/comment2.png"
OnClientClick= '<%# String.Format("return showComment(""{0}"",""{1}"")", "Parameter1", ""Parameter2") %>'
ToolTip="Click here to view a Comment" Visible='<%# CheckPendStatus() %>' />
and it gives an Error
Error 149 Comma, ')', or a valid expression continuation expected.
Error 219 Comma, ')', or a valid expression continuation expected.
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@dotnetfunda.com
http://www.Dotnetfunda.com
|
|
|
|