|
In my jsp page,there are two drop dwon box.
If i select value from one drop down box suppose that value is any country name and
i want the state of that country in another drop down box.
But i want that state from database.
how can access it?
Plz help me.
Thank U.
aarti
|
|
|
|
|
aartib wrote: In my jsp page
me no talk jsp
but, what you need is when an items is selected from the first drop down post the page back, then find out the selected item, run your query to get the value of state from database and fill second drop down.
another way is, spit out country/state info into js and you can handle everything on the client side.
even better is look at AJAX.
|
|
|
|
|
Hi,
I have problem with my goole calender.I could embed the My google calender into my html with a size 200X200 pixel only showing the mouth.But the calender is not displaying the events which i have given.Can any one help me out to show the events in the calender.
|
|
|
|
|
How do I use both paging and auto-complete on an extJS ComboBox with a JSonStore? Auto-complete works fine while the store is local and paging works fine when remote, but as soon as I go remote, I lose the auto-complete, even if the items to be shown are already in the current page.
|
|
|
|
|
hello
How'd you choose your vendor for SSL cert? This is for web server/IIS with shopping cart integrated with PayPal Standard (i.e. payment actually done in PayPal site but you'd still need to guard against DNS spoofing and tell customer you are who you are)
I browsed around here are some options, all EV certs (green bar on your browser):
Versign
US$995/year
http://www.verisign.com/ssl/buy-ssl-certificates/secure-site-services/index.html
Digicert
US$488/year
http://www.digicert.com/ev-ssl-certification.htm
InstallSSL
US$359/year
http://www.instantssl.com/ssl-certificate-products/ssl/ssl-certificate-ev.html?entryURL=
What's your take on this? Doesn't have to be these three...
Thanks
dev
|
|
|
|
|
Basically I am trying to make a sort of conditional statement in CSS. I am making A div containing a form pop up through clicking on a link. The link is below to show that I am just using it as a button to make the form pop up through css.
<a href="#" class="cnb">Create New Blog
<div class="hide">
<form action="#" method="post">
OMITTED FORM FOR SPACE
</form>
</div
The CSS is
.hide {
display:none;
}
a.cnb:active .hide {
display:block;
position:absolute;
top:0px;
bottom:0px;
left:0px;
right:0px;
z-index:1000;
color:#000000;
}
a.cnb .hide:hover {
display:block;
position:absolute;
top:0px;
bottom:0px;
left:0px;
right:0px;
z-index:1000;
color:#000000;
}
So basically the div is a link, and when you hover over the div, which is the size of the web browser, it stays there. Problem is<b>When you scroll out of the web window the div disapears because you are no longer hovering over it.</b>
My first question is, <b>Can I do this without the use of a link and just make the div pop up so that it wont disapear when I scroll off the web browser window.</b>
My Second Question is, <b>Can I do some kind of conditional statement is css like the one below I was trying. Basically I am trying to say in the css that "IF .hide is display:block THEN make it these styles." If I can make a condition like this it would solve the problem.</b>
a.cnb .hide:"display:block" {
display:block;
position:absolute;
top:0px;
bottom:0px;
left:0px;
right:0px;
z-index:1000;
color:#000000;
}
Perhaps there is a way to do
a.cnb .hide:active OR :focus??? I thies this but is doesn't work.
I have been working on this forever and cant figure it out. Any help is useful. THANK YOU!!!
modified on Friday, May 15, 2009 3:41 PM
|
|
|
|
|
It is really urgent that I figure this out ASAP Thanks!
|
|
|
|
|
you can do it with javascript & css
<script>
function show(){
document.getElementById('popupform').style.visibility = 'visible';
document.getElementById('popupform').style.display = 'block';
}
</script>
<div id="hoverbtn" onMouseOver="show()">btn text</div>
<div id="popupform"> form goes here </div>
|
|
|
|
|
I have a html page that sends a message to my tomcat server to create and save a csv file. On the html itself is the link to the created file but it's hidden until the server completes the request. Once the file is created, a response is sent to the html to display the link to that particular file. Instead of having the file contents open up in the browser, how do I force it to display a save as dialog?
I read somewhere that you need to change the header to "Content-Disposition". Is that something I need to do after creating the text file on the server and before sending a response to html page? Or should this get handled on the a href tag where I can link it to a jsp file on the server to handle the forced download?
Any help would be much appreciated!
|
|
|
|
|
here is php code for a csv file. jsp should be similar:
header("Content-Transfer-Encoding", "binary");
header('Cache-Control: maxage=3600');
header('Pragma: public');
header('Content-type: application/csv');
header('Content-Disposition: attachment; filename="exportclients.csv"');
readfile('exportclients.csv');
|
|
|
|
|
and you may want to use:
application/force-download
|
|
|
|
|
|
Hi,
I have create web project and use ASP.NET C# 2.0,SqlServer2005,Ajax Etc
When I have create setup and install on client machine then install on client machine
.net framework/Sqlexpress and create database but ajax install manualy and change
web.config in Connection string as
<add key="ConnectionString" value="server=MachineName\SQLEXPRESS; database=Database; trusted_connection=yes;">
But I have need Install on client machine one click
How to add ajaxSetup in Web Setup and change web.config and
if client machine not have iis then how to create IIS and virtual directory and run application
Please can any body help.
Thanks & Regard
|
|
|
|
|
how can get content management editor in my site ?and how can manage contents in our web site using content mangement editor in asp.net with c#?
|
|
|
|
|
you can either build one from scratch (expect a few weeks work depending on how big it needs to be) or you can install a premade one try googling along the lines of:
"asp.net content management system c#" or
"simple asp.net cms" etc
|
|
|
|
|
Based on my coding, i can upload image to my server,and all image is renamed absed on the time()...so if i wan to display it out, what should i do since the filename may b different?
<?php
define ("MAX_SIZE","100");
function getExtension($str) {
$i = strrpos($str,".");
if (!$i) { return ""; }
$l = strlen($str) - $i;
$ext = substr($str,$i+1,$l);
return $ext;
}
$errors=0;
if(isset($_POST['Submit']))
{
$image=$_FILES['image']['name'];
if ($image)
{
$filename = stripslashes($_FILES['image']['name']);
$extension = getExtension($filename);
$extension = strtolower($extension);
if (($extension != "jpg") && ($extension != "jpeg") && ($extension != "png") && ($extension != "gif"))
{
echo '<h1>Unknown extension!</h1>';
$errors=1;
}
else
{
$size=filesize($_FILES['image']['tmp_name']);
if ($size > MAX_SIZE*1024)
{
echo '<h1>You have exceeded the size limit!</h1>';
$errors=1;
}
$image_name=time().'.'.$extension;
$newname="images/".$image_name;
$copied = copy($_FILES['image']['tmp_name'], $newname);
if (!$copied)
{
echo '<h1>Copy unsuccessfull!</h1>';
$errors=1;
}}}}
if(isset($_POST['Submit']) && !$errors)
{
echo "<h1>File Uploaded Successfully! Try again!</h1>";
}
?>
<form name="newad" method="post" enctype="multipart/form-data" action="upload.php">
<table>
<tr><td><input type="file" name="image"></td></tr>
<tr><td><input name="Submit" type="submit" value="Upload image"></td></tr>
</table>
</form>
http://CodeBasic.net
|
|
|
|
|
you can store the name as a session variable and then use it or for a more permanent soultion record the name in a database so you can use it repeatedly.
|
|
|
|
|
I need to know if there is anyone that can help with this ejb's. I'm just trying to set up a simple timer. I want to set it up in intervals plus I need to know what all does the ejb needs. And its ejb3.0 and ejb is Enterprise Java Beans. The code is below:
Client: -> did have something but wasn't working correctly.
package ejb30.STClient;
import ejb30.STBean.*;
import javax.ejb.EJB;
import javax.ejb.TimerService;
import javax.naming.*;
public class Client
{
}
Remote:
package ejb30.STBean;
import javax.ejb.Remote;
import javax.naming.NamingException;
@Remote
public interface STBeanRemote
{
public void Timer();
}
Bean:
package ejb30.STBean;
import javax.annotation.Resource;
import javax.ejb.Stateless;
import javax.ejb.TimedObject;
import javax.ejb.TimerService;
import sun.misc.Timer;
@Stateless
public class STBean implements STBeanRemote, TimedObject {
@Resource
private TimerService gog;
public void setSessionContext()
{
}
public void Timer()
{
Timer ts = (Timer) gog.createTimer(0, 15000, null);
}
@Override
public void ejbTimeout(javax.ejb.Timer timer)
{
System.out.println("I'm working");
}
}
XML:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 EJB 3.0//EN" "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_3_0-0.dtd">
<ejb-jar xmlns ="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://ww.w3.org/2001/XMLSchema-instance"
metadata-complete="true" version="3.0"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/nx/javaee/ejb-jar_3_0.xsd">
<enterprise-beans>
<session>
<display-name>STBean</display-name>
<ejb-name>STBean</ejb-name>
<business-remote>ejb30.STBean.STBeanRemote</business-remote>
<ejb-class>ejb30.STBean.STBean</ejb-class>
<session-type>Stateless</session-type>
<transaction>Container</transaction>
<security-identity>
<use-caller-identity />
</security-identity>
</session>
</enterprise-beans>
</ejb-jar>
I edited it with the proper tags... please help.
|
|
|
|
|
|
Hi
Hope someone can help with this as I'm feeling a bit stupid at the moment!
I've got a form (using a master page and an update panel in case it's relevant). This is also (and unfortunately needs to) running in IE6.
On there are 3 text boxes which are pre-populated server side. When the value of one of these changes, I need to update another part of the screen (client-side, this doesn't need to go back to the server). So, each of those text boxes has:onFocus="storeValue(this)" onBlur="leavingField(this) so that on entry to the field the value is stored in a global variable and on exit this is checked and actioned if it has changed. The first time you enter and exit a field it behaves as expected, subsequently you get a 'Function Expected' error.
The relevant code is:
var valStore;
function storeValue(field) {
valStore = field.value;
}
function hasValueChanged(val) {
if (val != valStore)
hasValueChanged = true;
else
hasValueChanged = false;
}
function leavingField(field) {
if (hasValueChanged(field.value)) {
var prefix = (ctlPrefix + curr);
calculateSingleDifference(field.id.split(prefix)[1]);
field.className = (field.className + ' changedValue');
}
}
The error is raised the second time 'hasValueChanged' is called in 'leavingField'.
Any ideas gratefully received!
Thanks in advance
Ben
|
|
|
|
|
Bjohnson33 wrote: function hasValueChanged(val) {
if (val != valStore)
hasValueChanged = true;
else
hasValueChanged = false;
}
well, to start with you got hasValueChanged both as function name and variable name. I can see where that originrated
try this for a size,
function hasValueChanged(val) {<br />
if (val != valStore)<br />
return true;<br />
else<br />
return false;<br />
}
|
|
|
|
|
Thanks Yusuf, exactly right - was obviously having a syntax meltdown - fifth language this week!
Ben
|
|
|
|
|
Hi,
I want to make a Quick Search Text box in my site. User can enter anything in quick search textbox and press the search button.
I want to populate my gridview with any product which has a word which the user entered in the text box.
For example if the user enters black in the textbox to search, I want to show
all black products like black pen, black book, black umbrella etc. It will be like a search button using SQL Server database.
could you please help me to set up this?
Thanks
modified on Friday, May 15, 2009 2:46 AM
|
|
|
|
|
CHANDUA wrote: It will be like a search button.
Except it will be quicker.
Where is your data coming from?
|
|
|
|
|
SELECT * FROM your_database_table WHERE Name = '%ENTERED_TEXT%'
That should get the info from the database. Dont forget the percent symbols - they will get anything that is simlar to the entered text.
If you are unsure what to do with this I suggest you google "asp c# sql tutorials" (I presume you are using asp & c# - if not replace this with the technology you are using) or hire a web designer.
|
|
|
|