|
Hello Folks,
I want to add a checkbox element before anchor tag on a webpage on the fly without any manual intervention.
I have tried IHTMLElement2::insertAdjacentElement and also IHTMLDOMNode::insertBefore function but I am not able to do the same.
Code:
1st Approach
IHTMLElement *pInputElement;
hr = m_ctrlWeb.m_pHtmlDoc->createElement(L"INPUT", &pInputElement);
IHTMLDOMNode *pDOMNode;
hr = pAnch->QueryInterface(__uuidof( IHTMLDOMNode),(void**)&pDOMNode);
IHTMLDOMNode *pNewDOMNode;
hr = pInputElement->QueryInterface(__uuidof( IHTMLDOMNode),(void**)&pNewDOMNode);
pDOMNode->insertBefore(pNewDOMNode, vIndex, &pNewDOMNode);
//here vIndex is the postion of the pAnch(IHTMLAnchorElement)
//I am not very sure of the third parameter as to what has to be given there.
2nd Approach
IHTMLElement *pInputElement;
hr = m_ctrlWeb.m_pHtmlDoc->createElement(L"INPUT", &pInputElement);
IHTMLElement2 *elem3;
hr = pDisp->QueryInterface(IID_IHTMLElement2, (void**) &elem3);
hr = elem3->insertAdjacentElement(L"beforeBegin", pInputElement, &pInputElement);
//Here also I am not sure as to what the 3rd parameter has to be provided.
Please let me know if theres any specific approach to be followed.
Thanks in advance,
Swati
|
|
|
|
|
how to a:hover inline
I know how to do it in the header.
I know how to do it in an external css file.
But looking online for examples to make the hover effect
inline in a tag does not seem to work, most people show examples
and they say this should work, and they also says, but it does not.
Anyone know how to make the hover effect of an anchor inline work?
cdmlb
|
|
|
|
|
try this link
http://www.webmasterworld.com/forum83/4061.htm
|
|
|
|
|
I am running code to connect to a database that stores theme data for a video game. This is the code I am running:
import java.sql.*; //import all the JDBC classes
import java.sql.*;
import java.io.IOException;
public class GetAccessToDatabase {
static Connection conn;
final String URL = "game.mdb";
public boolean OpenConnection() throws SQLException, IOException
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}
catch (Exception e)
{
System.out.println("Could not load the driver.");
e.printStackTrace();
return false;
}
try
{
conn = DriverManager.getConnection
("jdbc:odbc:" + URL, "", "");
return true;
}
catch (Exception e) {
System.err.println("Problems with get connection sent to "+URL+
": "+e.getMessage());
}
return false;
}
public void CloseConnection() throws SQLException
{
conn.close();
}
public static void main(String args[])
{
try
{
GetAccessToDatabase connect = new GetAccessToDatabase();
if(connect.OpenConnection())
{
Statement stmt = conn.createStatement();
/*
stmt.executeUpdate("INSERT INTO student "
+ "(name, studentNumber, class, major) "
+ "VALUES ('Smith', '17', 1, 'CS')");
*/
// more database statements
connect.CloseConnection();
}
}
catch (Exception e) {
System.err.println("problems with SQL sent from "+"static main function"+
": "+e.getMessage());
}
}
}
And this is the message I receive from the exception thrown:
Problems with get connection sent to game.mdb: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Basically, it doesn't see the game.mdb which I have placed in the local directory. I believe it is expecting some type of table in SQL, but how do I do that in MS Windows from Access? Any and all help would be greatly appreciated.
Thank you,
Red Sunday
-----------------
http://www.zachcalvert.com
|
|
|
|
|
You need to register an ODBC datasource and pass the name of that to the getConnection() method rather than the name of the access file.
Store your favourite bookmarks online: my-faves.co.uk
|
|
|
|
|
can unix server support asp and jsp?
includeh10
|
|
|
|
|
JSP =~ ASP, but JSP is Java
Java should be platform independent so normally, nooo problem man.
don't know about asp.
hope this helps.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
you can get asp.net (but not asp) working with apache using the mono project. on unix based systems there's a mono module for apache. have a look at www.go-mono.com
--
Raoul Snyman
Saturn Laboratories
e-mail: raoul.snyman@saturnlaboratories.co.za
web: http://www.saturnlaboratories.co.za/
linux user: #333298
|
|
|
|
|
|
i have multiple html pages which contain same html code to diaplay same info.
I want to put this part of code in one html page then inclluded or imported by other pages --- is it possible? if yes, how to do?
thank
includeh10
|
|
|
|
|
This is indeed possible and quite common. You need to use the following:
<!--#include file="thefile.ext" -->
|
|
|
|
|
Hi friends, am currently making an online booking system which accepts customers name, ID no. and credit card number among other details. This data is then sent to the remote database via the internet. Please help me with the server-side validation code using Perl scripting language. You can also advise me accordingly. thanx friends.
Micom
micom village
|
|
|
|
|
As a general rule of thumb web database security usually goes something like principle of least privilege.
1) Strip out any non essential characters
2) Check the format/validate
3) Check the length of data (although i'm sure languages like Perl and PHP or MySQL use dynamic memory allocation, so i'm not sure why length checking is important, except for just incase theres a bug, type situations.)
4) You may have to escape special characters (single quote, etc)
Use regex to quickly and easily strip non-required characters and check the format of the input.
See Regex Library[^] to save yourself some work.
Cheers
How do I print my voice mail?
|
|
|
|
|
I have a problem with asp page, i have this statement:
" con.execute("insert into members ( first_name, last_name, mobile, email, username, password) values('"&firstname&"','"&lastname&"','"&mobile&"','"&email&"','"&username&"','"&password&"')")"
and i use access database
when i run this page i have an error that told me to make "updatetable query" and i don't know how to do this
could any one help me please
|
|
|
|
|
Check the permissions on the access .mdb file. If the iusr_machine account does not have write/modify access on the database, you cannot perform any updates. Also, because you have to modify these permissions, if possible move the access database outside of your IIS root folders.
|
|
|
|
|
1-Check your access database file .You must write,update permissions on it.
2-Try to open open database in write,update mode by code.
'---- LockTypeEnum Values ----
Const adLockReadOnly = 1
Const adLockPessimistic = 2
Const adLockOptimistic = 3
Const adLockBatchOptimistic = 4
--junior coder--
|
|
|
|
|
I have a need to do an ASP form for authenticating users against an LDAP server. Once the user has successfully authenticated, I need to programmatically set the REMOTE_USER environment variable to faciliate later access to a third party application.
Is there anyway to manually set the REMOTE_USER ServerVariable from server side ASP?
|
|
|
|
|
hi
I need to logout a user when he goes to a page external to the site.
help please?
Chaitanya
|
|
|
|
|
Helo
well Dear what actually you need to do tell breifly
thanks
Balouchi
|
|
|
|
|
Thanks for your response.
I am trying to make a web application in which i want to logoff the user when he goes to a site url outside my application.
For eg. he is on the default page of my website and he goes to hotmail.com.
The problem is that session_end is not firing properly nor the session timeout is working.
I can't logoff the user on Unload event as he will get logged off browsing through the site also.
Basically i want to call logooff.asp when the user browses to a new site other than any of the web pages in my site.
|
|
|
|
|
Every control like textbox, dropdown in C#.Net web got to set the property AutoPostBack = True to run the event. Is it possible not to set PostBack to generate the event?
|
|
|
|
|
since the asp controls run on the server so the server should know about the event when it occurs and execute the right procedure, so the AutoPostBack property should be set to true, but if u don't need to postback to the server so i think u need to use HTML controls which runs on the client.
|
|
|
|
|
hi every one,
I have two HTML pages, tmp1.htm and tmp2.htm. In tmp2.htm i have one para like <p id="para1">..............</p>. When i need to refer this particular portion of tmp.htm from tmp1.htm, i write anchor tag as <a href="tmp2.htm#para1">.
Here i need your help, when i click on the link which is placed on tmp1.htm, it should call a javascript function placed in tag
Now tell me by using which event should i call that function.
try this link
http://www.geocities.com/seshu_raj/tmp1.htm
thanks a lot in advane
raju
|
|
|
|
|
When u click on the link then javascript function can be called on onClick event as:
<a href="tmp2.htm#para1" onclick="fonction1()">Something</a>
|
|
|
|
|
Hi,
Hi,
I am new to ASP (or ASP .NET) and I am trying to find resources to create an event-driven weekly calendar. I know there are many COTS products out there but I don't have budget to buy any so I need to do it on my own. I found a good example in MSDN ( http://msdn.microsoft.com/library/default.asp?URL=/library/en-us/dnasp/html/calendar.asp[^] )that shows you how to do it, this is a great start but the example is for a monthly view. I need a weekly view. Can anyone tell me where to find an example or how do I do the algorithm? ASP or ASP .NET would do. Thanks in advance.
PP.
|
|
|
|