473,326 Members | 2,337 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

tricky javascript situation

On the backend I have a python script that gets two pieces of
information from the database:
1. html
2. xml file

The javascript is supposed to :
1. inject the html file into a div
2. use the xml file to create markers on google maps

I want to avoid multiple calls to the database, so I was wondering, if
there was anyway I could get javascript to recieve both files at once
from python (and if it was possible for python to send two files in
one request).

I hope that makes sense, I didn't really know how to summarize it for
a brief subject line :-/

thanks in advance!
Sep 20 '08 #1
4 1414
iceanfire wrote:
On the backend I have a python script that gets two pieces of
information from the database:
1. html
2. xml file

The javascript is supposed to :
1. inject the html file into a div
2. use the xml file to create markers on google maps

I want to avoid multiple calls to the database, so I was wondering, if
there was anyway I could get javascript to recieve both files at once
from python (and if it was possible for python to send two files in
one request).
You could embed the HTML markup declared as CDATA in the XML markup.
I hope that makes sense, I didn't really know how to summarize it for
a brief subject line :-/
That's a pity.
PointedEars
--
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
-- from <http://www.vortex-webdesign.com/help/hidesource.htm>
Sep 21 '08 #2
On Sep 21, 11:08*am, Thomas 'PointedEars' Lahn <PointedE...@web.de>
wrote:
iceanfire wrote:
On the backend I have a python script that gets two pieces of
information from the database:
1. html
2. xml file
The javascript is supposed to :
1. inject the html file into a div
2. use the xml file to create markers on google maps
I want to avoid multiple calls to the database, so I was wondering, if
there was anyway I could get javascript to recieve both files at once
from python (and if it was possible for python to send two files in
one request).

You could embed the HTML markup declared as CDATA in the XML markup.
I hope that makes sense, I didn't really know how to summarize it for
a brief subject line :-/

That's a pity.

PointedEars
--
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
* -- from <http://www.vortex-webdesign.com/help/hidesource.htm>
You could make the to calls, and join the result in a single XML:
<2callsin1>
<xmldata>......</ xmldata>
<htmldata>.....</ htmldata>
</ 2callsin1>
Sep 22 '08 #3
Sister Ray wrote:
Thomas 'PointedEars' Lahn wrote:
>iceanfire wrote:
>>On the backend I have a python script that gets two pieces of
information from the database:
1. html
2. xml file
The javascript is supposed to :
1. inject the html file into a div
2. use the xml file to create markers on google maps
I want to avoid multiple calls to the database, so I was wondering, if
there was anyway I could get javascript to recieve both files at once
from python (and if it was possible for python to send two files in
one request).
You could embed the HTML markup declared as CDATA in the XML markup.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
>[...]

You could make the to calls, and join the result in a single XML:
<2callsin1>
<xmldata>......</ xmldata>
<htmldata>.....</ htmldata>
</ 2callsin1>
What is your purpose in just reiterating what I said, but in gibberish and
invalid code, while foolishly continuing to quote signatures, despite my
previous explicit asking you to stop doing that?
Score adjusted

PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f8*******************@news.demon.co.uk>
Sep 22 '08 #4
Thomas 'PointedEars' Lahn wrote:
....
What is your purpose in just reiterating what I said, but in
gibberish and invalid code, while foolishly continuing to quote
signatures, despite my previous explicit asking you to stop doing
that?
Score adjusted

PointedEars
Would you pleas explain, what you mean by 'Score adjusted'?

What happens to you, if the signature is quoted? Do you become
ill, angry, get headace or something else? You have repeated
your command 'do not quote signatures' many times, so I might
help here somewhat:

'do not quote signatures'
'do not quote signatures'
'do not quote signatures'
'do not quote signatures'
'do not quote signatures'
Sep 23 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ryan | last post by:
I have a problem with record locking / blocking within an application. The app is quite straight forward. Written in Delphi 5 using BDE to access a SQL 7 database (Win2K server). Every so often...
1
by: Tim | last post by:
Hello, I'm extremely puzzled; I cannot figure out what I'm doing wrong. Here's the situation. I would really appreciate any suggestions. I'm modifying a shopping cart in the following way....
0
by: Piotr Szukalski | last post by:
Hi! I have a quite tricky question about .NET debugger: do I need to install the whole SDK to make SDK CLR debugger working? The situation is as follows: I have an application deployed to 130...
136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
25
by: PyPK | last post by:
What possible tricky areas/questions could be asked in Python based Technical Interviews?
14
by: felixnielsen | last post by:
Consider this 3d vector: const SIZE = 'some_size'; std::vector<std::vector<std::vector<char> > >GRID(SIZE, std::vector<std::vector<char> >(SIZE, std::vector<char>(SIZE))); It can be viewed...
5
by: Johnny Ljunggren | last post by:
Hello all I've got this tricky situation that I would like to solve in SQL, but don't know how to do. This is the table: Id = 3, VId = 2, Time1 = 10:00, Time2 = 14:00 Id = 4, VId = 2, Time1 =...
9
by: howachen | last post by:
Hi, I have one very simple tricky question which is quite interesting, I would like to share with all of you here... //======================================= <script...
7
by: John | last post by:
Hi Everyone, I'm having this extremely annoying problem with Internet Explorer 6, giving me an error message saying "unknown runtime error" whenever I try to alter the contents of a <divelement...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.