sruthi reddy

Ranch Hand
+ Follow
since Aug 03, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sruthi reddy

Hi
I am testing a url which contains other multiple urls(which are forms), how do i get the urls from the current page(first page) and then again load test the new urls from this page. I have written a script which tests first page and also to test from with urls from parameter file but i want to make it dynamic so that i need not change script in future. Any examples are appreciated.
Thanks
Sruthi
11 years ago
Hi
I have a situation where i am doing post from html form and servet is writing back the output as a output stream using out.write. Can any one suggest me how to capture that output and manupulate the data and use in different files. Earlier i used to use ajax to do this but now i can use ajax. Can i do anything using either javascript or java to capture data and manupulate it.
Thanks
Sruthi
12 years ago
Hi
I have a situation where i am doing post from html form and servet is writing back the output as a output stream using out.write. Can any one suggest me how to capture that output and manupulate the data and use in different files. Earlier i used to use ajax to do this but now i can use ajax. Can i do anything using either javascript or java to capture data and manupulate it.
Thanks
Sruthi
Hi
I have a situation where i need to make ajax call to a servlet which i located in other server.I coded and it was working fine in my local host but i deployed to the server , its giving me error permission denied. I think the reason might me that my application and my server are located in different domains and i am trying to call servlet which is on third domain. If that is the case can anyone suggest me a solution which will work.
Thanks
Sruthi
Hi
In my application, i am crreating a dynamic drop down list using javascript and its working fine when i am using IE browser. If i am trying same with firefox, its not wotking. Can anyone suggest me how to solve this issue. Here is the code which i am using.

function addOption(selectbox,text,value )
{
var optn = document.createElement("OPTION");
optn.text = text;
optn.value = value;
selectbox.options.add(optn);
}

Problem is with the line " selectbox.options.add(optn); ". Can anyone suggest me alternate option or how to make this work.

Thanks
Hi
can anyone give me a tip how to show and highlight a image(which is link) when we bring curser over the image.
Sruthi
Hi
I have a situation where i need to go back to the same page.
For example, I has pageA which loads some data onload using javascript onload method.when we search on pageA we will get different set of data and when i click on link from this search results of pageA it will take back to pageB. From pageB i am using history.go method to come back to pageA. But as pageA loads its giving me intial data of pageA as it is calling onload method. Is there a way in which i can go back to same search page from wherei selected the link instead of intial data.
Thanks
sruthi
Hi
I have a situation where, when user selects a value from list of values ( currently its multiple selction drop down list) and if user clicks add then that value should be added to either a textarea (or any other field indicating user the list of selected values) and also same way user should also remove the selected values. Also i need to keep track of all the selected values to execute queary later. So can anyone suggest me how to do this kind of functionality.
Thanks
Sruthi
Hi
I need to enable or disable a link <a href="link.html">click here</a> depending on a intial intial condition yes or no. Can anyone suggest me how to do this.
Thanks
sruthi
Hi
I have a situation where i need to get multiple (single or no values depending on selection) values from drop down list and validate them.Can anyone suggest me how to get values using javascript in same file.

var multipleState = document._main.state.value;

this is not working.

Thanks
Sruthi
Hi
I have a situation where i need to clear the value of input file of a html form. can any one suggest me how to do this using javascript.

input type='file' id='file1' name='file1' />

i tired doing document.emailForm.file1.value = ""; but this didnt worked.

Thanks
I am trying to send email with some attachments and it was working fine in my local machine.But when i deployed the application in the server, its not working . i am not sure what exception its giving but this is the code i am using to send mail

String file1 = (String)request.getParameter("file1");
String file2 = (String)request.getParameter("file2");
String file3 = (String)request.getParameter("file3");


try {

Properties props = new Properties();
String smtp = "";
String semail = "";

try
{
System.out.println("getting context");
javax.naming.Context ctx = new javax.naming.InitialContext();
smtp = (String) ctx.lookup("java:comp/env/smtp");
semail = (String) ctx.lookup("java:comp/env/semail");
} catch (Exception e) {
System.err.println("Error in getting SMTP address "+e);
e.printStackTrace();
}

System.out.println("SMTP="+smtp);
props.put("mail.smtp.host", smtp);
Session session = Session.getDefaultInstance(props, null);

Message msg = new MimeMessage(session);

InternetAddress addressFrom = new InternetAddress(from);
msg.setFrom(addressFrom);

InternetAddress addressTo = new InternetAddress(to);
msg.setRecipient(Message.RecipientType.TO, addressTo);

// InternetAddress[] addressTo = new InternetAddress[recipients.length];
// for (int i = 1; i < 2; i++)
// {
if ((cc == "") || (cc == null) || (cc ==" ")) {
//InternetAddress addressCC = new InternetAddress(cc);
//msg.setRecipient(Message.RecipientType.CC, addressCC);
}else {
InternetAddress addressCC = new InternetAddress(cc);
msg.setRecipient(Message.RecipientType.CC, addressCC);
}

//addressTo[i] = new InternetAddress(recipients[i]);
// }
// msg.setRecipients(Message.RecipientType.TO, addressTo);


// Optional : You can also set your custom headers in the Email if you Want
msg.addHeader("MyHeaderName", "email from FHAContact Application");

// Setting the Subject and Content Type
msg.setSubject(subject);
// msg.setText(message);



//Adding Attachments:
Multipart multipart = new MimeMultipart();
BodyPart messageBodyPart = new MimeBodyPart();
messageBodyPart.setText(message);
multipart.addBodyPart(messageBodyPart);
messageBodyPart = new MimeBodyPart();

/* Multipart multipart1 = new MimeMultipart();
BodyPart messageBodyPart1 = new MimeBodyPart();
// messageBodyPart.setText(message);
multipart.addBodyPart(messageBodyPart1);
messageBodyPart1 = new MimeBodyPart(); */

//first attachment
if ((file1!=null) && (file1.trim().length() > 0) ) {
DataSource source = new FileDataSource(file1);
messageBodyPart.setDataHandler(new DataHandler(source));
messageBodyPart.setFileName(source.getName());
multipart.addBodyPart(messageBodyPart);
}

//Second attachment
if ((file2!=null) && (file2.trim().length() > 0) ) {
BodyPart messageBodyPart1 = new MimeBodyPart();
DataSource source2 = new FileDataSource(file2);
messageBodyPart1.setDataHandler(new DataHandler(source2));
messageBodyPart1.setFileName(source2.getName());
multipart.addBodyPart(messageBodyPart1);
}

//Third attachment
if ((file3!=null) && (file3.trim().length() > 0) ) {
BodyPart messageBodyPart2 = new MimeBodyPart();
DataSource source3 = new FileDataSource(file3);
messageBodyPart2.setDataHandler(new DataHandler(source3));
messageBodyPart2.setFileName(source3.getName());
multipart.addBodyPart(messageBodyPart2);
}


msg.setContent(multipart);
Transport.send(msg);
13 years ago
Hi
I am working on a application where i need to attach some files to and email and send them.I have coded in my local machine and it was working perfectly fine but when i deployed the application to the server, its not working , i think its throwing some exception.Can any one suggest me wt to do.
Thanks
Sruthi
13 years ago
Hi
I have a situation where on click of a link in a jsp, a pop up window sholud open with title "are you want to go" and with two buttons yes and no.On yes, a other jsp will open and on no another jsp.Can anyone suggest me how to do this either using java or javascript.
Thanks
Sruthi